using System;
using System.Data;
using System.Collections;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1TrueDBGrid;
using PCSComProduction.WorkOrder.BO;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComUtils.PCSExc;
using PCSUtils.Log;
using PCSUtils.Utils;
using PCSComProduction.WorkOrder.DS;
using PCSComUtils.DataContext;
using System.Collections.Generic;


namespace PCSProduction.WorkOrder
{
    /// <summary>
    /// Summary description for Pro_IssueSubMaterial.
    /// </summary>
    public class IssueSubMaterial : System.Windows.Forms.Form
    {
        #region Gennerate Code
        private System.Windows.Forms.Label lblTranNo;
        private System.Windows.Forms.TextBox txtTranNo;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button btnTranNo;
        private System.Windows.Forms.Button btnFGoodsCode;
        private System.Windows.Forms.Button btnProLine;
        private System.Windows.Forms.TextBox txtFGoodsCode;
        private System.Windows.Forms.Label lblFGoodsCode;
        private System.Windows.Forms.TextBox txtProLine;
        private System.Windows.Forms.Label lblProLine;
        private System.Windows.Forms.Button btnWOLine;
        private System.Windows.Forms.TextBox txtWOLine;
        private System.Windows.Forms.Label lblWOLine;
        private System.Windows.Forms.Button btnAdd;
        private System.Windows.Forms.Button btnEdit;
        private System.Windows.Forms.Button btnSave;
        private System.Windows.Forms.Button btnClose;
        private System.Windows.Forms.Button btnHelp;
        private System.Windows.Forms.Button btnFromLoc;
        private System.Windows.Forms.TextBox txtFromLoc;
        private System.Windows.Forms.Label lblFromLoc;
        private System.Windows.Forms.Button btnFromBin;
        private System.Windows.Forms.TextBox txtFromBin;
        private System.Windows.Forms.Label lblFromBin;
        private C1.Win.C1Input.C1DateEdit dtmPostDate;
        private C1.Win.C1TrueDBGrid.C1TrueDBGrid dgrdData;
        private C1.Win.C1List.C1Combo cboCCN;
        private System.Windows.Forms.Label lblCCN;
        private System.Windows.Forms.Button btnDelete;
        private System.Windows.Forms.TextBox txtProductDetail;
        private System.Windows.Forms.Label lblProductDetail;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.Container components = null;

        public IssueSubMaterial()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        #endregion

        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(IssueSubMaterial));
            this.lblTranNo = new System.Windows.Forms.Label();
            this.txtTranNo = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.btnTranNo = new System.Windows.Forms.Button();
            this.btnFGoodsCode = new System.Windows.Forms.Button();
            this.btnProLine = new System.Windows.Forms.Button();
            this.txtFGoodsCode = new System.Windows.Forms.TextBox();
            this.lblFGoodsCode = new System.Windows.Forms.Label();
            this.txtProLine = new System.Windows.Forms.TextBox();
            this.lblProLine = new System.Windows.Forms.Label();
            this.btnWOLine = new System.Windows.Forms.Button();
            this.txtWOLine = new System.Windows.Forms.TextBox();
            this.lblWOLine = new System.Windows.Forms.Label();
            this.btnFromLoc = new System.Windows.Forms.Button();
            this.txtFromLoc = new System.Windows.Forms.TextBox();
            this.lblFromLoc = new System.Windows.Forms.Label();
            this.btnFromBin = new System.Windows.Forms.Button();
            this.txtFromBin = new System.Windows.Forms.TextBox();
            this.lblFromBin = new System.Windows.Forms.Label();
            this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
            this.btnAdd = new System.Windows.Forms.Button();
            this.btnEdit = new System.Windows.Forms.Button();
            this.btnDelete = new System.Windows.Forms.Button();
            this.btnSave = new System.Windows.Forms.Button();
            this.btnClose = new System.Windows.Forms.Button();
            this.btnHelp = new System.Windows.Forms.Button();
            this.dtmPostDate = new C1.Win.C1Input.C1DateEdit();
            this.cboCCN = new C1.Win.C1List.C1Combo();
            this.lblCCN = new System.Windows.Forms.Label();
            this.txtProductDetail = new System.Windows.Forms.TextBox();
            this.lblProductDetail = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.cboCCN)).BeginInit();
            this.SuspendLayout();
            // 
            // lblTranNo
            // 
            this.lblTranNo.AccessibleDescription = resources.GetString("lblTranNo.AccessibleDescription");
            this.lblTranNo.AccessibleName = resources.GetString("lblTranNo.AccessibleName");
            this.lblTranNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblTranNo.Anchor")));
            this.lblTranNo.AutoSize = ((bool)(resources.GetObject("lblTranNo.AutoSize")));
            this.lblTranNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblTranNo.Dock")));
            this.lblTranNo.Enabled = ((bool)(resources.GetObject("lblTranNo.Enabled")));
            this.lblTranNo.Font = ((System.Drawing.Font)(resources.GetObject("lblTranNo.Font")));
            this.lblTranNo.ForeColor = System.Drawing.Color.Maroon;
            this.lblTranNo.Image = ((System.Drawing.Image)(resources.GetObject("lblTranNo.Image")));
            this.lblTranNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblTranNo.ImageAlign")));
            this.lblTranNo.ImageIndex = ((int)(resources.GetObject("lblTranNo.ImageIndex")));
            this.lblTranNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblTranNo.ImeMode")));
            this.lblTranNo.Location = ((System.Drawing.Point)(resources.GetObject("lblTranNo.Location")));
            this.lblTranNo.Name = "lblTranNo";
            this.lblTranNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblTranNo.RightToLeft")));
            this.lblTranNo.Size = ((System.Drawing.Size)(resources.GetObject("lblTranNo.Size")));
            this.lblTranNo.TabIndex = ((int)(resources.GetObject("lblTranNo.TabIndex")));
            this.lblTranNo.Tag = "0";
            this.lblTranNo.Text = resources.GetString("lblTranNo.Text");
            this.lblTranNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblTranNo.TextAlign")));
            this.lblTranNo.Visible = ((bool)(resources.GetObject("lblTranNo.Visible")));
            // 
            // txtTranNo
            // 
            this.txtTranNo.AccessibleDescription = resources.GetString("txtTranNo.AccessibleDescription");
            this.txtTranNo.AccessibleName = resources.GetString("txtTranNo.AccessibleName");
            this.txtTranNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtTranNo.Anchor")));
            this.txtTranNo.AutoSize = ((bool)(resources.GetObject("txtTranNo.AutoSize")));
            this.txtTranNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtTranNo.BackgroundImage")));
            this.txtTranNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtTranNo.Dock")));
            this.txtTranNo.Enabled = ((bool)(resources.GetObject("txtTranNo.Enabled")));
            this.txtTranNo.Font = ((System.Drawing.Font)(resources.GetObject("txtTranNo.Font")));
            this.txtTranNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtTranNo.ImeMode")));
            this.txtTranNo.Location = ((System.Drawing.Point)(resources.GetObject("txtTranNo.Location")));
            this.txtTranNo.MaxLength = ((int)(resources.GetObject("txtTranNo.MaxLength")));
            this.txtTranNo.Multiline = ((bool)(resources.GetObject("txtTranNo.Multiline")));
            this.txtTranNo.Name = "txtTranNo";
            this.txtTranNo.PasswordChar = ((char)(resources.GetObject("txtTranNo.PasswordChar")));
            this.txtTranNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtTranNo.RightToLeft")));
            this.txtTranNo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtTranNo.ScrollBars")));
            this.txtTranNo.Size = ((System.Drawing.Size)(resources.GetObject("txtTranNo.Size")));
            this.txtTranNo.TabIndex = ((int)(resources.GetObject("txtTranNo.TabIndex")));
            this.txtTranNo.Text = resources.GetString("txtTranNo.Text");
            this.txtTranNo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtTranNo.TextAlign")));
            this.txtTranNo.Visible = ((bool)(resources.GetObject("txtTranNo.Visible")));
            this.txtTranNo.WordWrap = ((bool)(resources.GetObject("txtTranNo.WordWrap")));
            this.txtTranNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtTranNo_KeyDown);
            this.txtTranNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtTranNo_Validating);
            // 
            // label1
            // 
            this.label1.AccessibleDescription = resources.GetString("label1.AccessibleDescription");
            this.label1.AccessibleName = resources.GetString("label1.AccessibleName");
            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
            this.label1.AutoSize = ((bool)(resources.GetObject("label1.AutoSize")));
            this.label1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label1.Dock")));
            this.label1.Enabled = ((bool)(resources.GetObject("label1.Enabled")));
            this.label1.Font = ((System.Drawing.Font)(resources.GetObject("label1.Font")));
            this.label1.ForeColor = System.Drawing.Color.Maroon;
            this.label1.Image = ((System.Drawing.Image)(resources.GetObject("label1.Image")));
            this.label1.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.ImageAlign")));
            this.label1.ImageIndex = ((int)(resources.GetObject("label1.ImageIndex")));
            this.label1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label1.ImeMode")));
            this.label1.Location = ((System.Drawing.Point)(resources.GetObject("label1.Location")));
            this.label1.Name = "label1";
            this.label1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label1.RightToLeft")));
            this.label1.Size = ((System.Drawing.Size)(resources.GetObject("label1.Size")));
            this.label1.TabIndex = ((int)(resources.GetObject("label1.TabIndex")));
            this.label1.Text = resources.GetString("label1.Text");
            this.label1.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.TextAlign")));
            this.label1.Visible = ((bool)(resources.GetObject("label1.Visible")));
            // 
            // btnTranNo
            // 
            this.btnTranNo.AccessibleDescription = resources.GetString("btnTranNo.AccessibleDescription");
            this.btnTranNo.AccessibleName = resources.GetString("btnTranNo.AccessibleName");
            this.btnTranNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnTranNo.Anchor")));
            this.btnTranNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnTranNo.BackgroundImage")));
            this.btnTranNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnTranNo.Dock")));
            this.btnTranNo.Enabled = ((bool)(resources.GetObject("btnTranNo.Enabled")));
            this.btnTranNo.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnTranNo.FlatStyle")));
            this.btnTranNo.Font = ((System.Drawing.Font)(resources.GetObject("btnTranNo.Font")));
            this.btnTranNo.Image = ((System.Drawing.Image)(resources.GetObject("btnTranNo.Image")));
            this.btnTranNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnTranNo.ImageAlign")));
            this.btnTranNo.ImageIndex = ((int)(resources.GetObject("btnTranNo.ImageIndex")));
            this.btnTranNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnTranNo.ImeMode")));
            this.btnTranNo.Location = ((System.Drawing.Point)(resources.GetObject("btnTranNo.Location")));
            this.btnTranNo.Name = "btnTranNo";
            this.btnTranNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnTranNo.RightToLeft")));
            this.btnTranNo.Size = ((System.Drawing.Size)(resources.GetObject("btnTranNo.Size")));
            this.btnTranNo.TabIndex = ((int)(resources.GetObject("btnTranNo.TabIndex")));
            this.btnTranNo.Text = resources.GetString("btnTranNo.Text");
            this.btnTranNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnTranNo.TextAlign")));
            this.btnTranNo.Visible = ((bool)(resources.GetObject("btnTranNo.Visible")));
            this.btnTranNo.Click += new System.EventHandler(this.btnTranNo_Click);
            // 
            // btnFGoodsCode
            // 
            this.btnFGoodsCode.AccessibleDescription = resources.GetString("btnFGoodsCode.AccessibleDescription");
            this.btnFGoodsCode.AccessibleName = resources.GetString("btnFGoodsCode.AccessibleName");
            this.btnFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnFGoodsCode.Anchor")));
            this.btnFGoodsCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnFGoodsCode.BackgroundImage")));
            this.btnFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnFGoodsCode.Dock")));
            this.btnFGoodsCode.Enabled = ((bool)(resources.GetObject("btnFGoodsCode.Enabled")));
            this.btnFGoodsCode.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnFGoodsCode.FlatStyle")));
            this.btnFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("btnFGoodsCode.Font")));
            this.btnFGoodsCode.Image = ((System.Drawing.Image)(resources.GetObject("btnFGoodsCode.Image")));
            this.btnFGoodsCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFGoodsCode.ImageAlign")));
            this.btnFGoodsCode.ImageIndex = ((int)(resources.GetObject("btnFGoodsCode.ImageIndex")));
            this.btnFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnFGoodsCode.ImeMode")));
            this.btnFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("btnFGoodsCode.Location")));
            this.btnFGoodsCode.Name = "btnFGoodsCode";
            this.btnFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnFGoodsCode.RightToLeft")));
            this.btnFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("btnFGoodsCode.Size")));
            this.btnFGoodsCode.TabIndex = ((int)(resources.GetObject("btnFGoodsCode.TabIndex")));
            this.btnFGoodsCode.Text = resources.GetString("btnFGoodsCode.Text");
            this.btnFGoodsCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFGoodsCode.TextAlign")));
            this.btnFGoodsCode.Visible = ((bool)(resources.GetObject("btnFGoodsCode.Visible")));
            this.btnFGoodsCode.Click += new System.EventHandler(this.btnFGoodsCode_Click);
            // 
            // btnProLine
            // 
            this.btnProLine.AccessibleDescription = resources.GetString("btnProLine.AccessibleDescription");
            this.btnProLine.AccessibleName = resources.GetString("btnProLine.AccessibleName");
            this.btnProLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnProLine.Anchor")));
            this.btnProLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnProLine.BackgroundImage")));
            this.btnProLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnProLine.Dock")));
            this.btnProLine.Enabled = ((bool)(resources.GetObject("btnProLine.Enabled")));
            this.btnProLine.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnProLine.FlatStyle")));
            this.btnProLine.Font = ((System.Drawing.Font)(resources.GetObject("btnProLine.Font")));
            this.btnProLine.Image = ((System.Drawing.Image)(resources.GetObject("btnProLine.Image")));
            this.btnProLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProLine.ImageAlign")));
            this.btnProLine.ImageIndex = ((int)(resources.GetObject("btnProLine.ImageIndex")));
            this.btnProLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnProLine.ImeMode")));
            this.btnProLine.Location = ((System.Drawing.Point)(resources.GetObject("btnProLine.Location")));
            this.btnProLine.Name = "btnProLine";
            this.btnProLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnProLine.RightToLeft")));
            this.btnProLine.Size = ((System.Drawing.Size)(resources.GetObject("btnProLine.Size")));
            this.btnProLine.TabIndex = ((int)(resources.GetObject("btnProLine.TabIndex")));
            this.btnProLine.Text = resources.GetString("btnProLine.Text");
            this.btnProLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProLine.TextAlign")));
            this.btnProLine.Visible = ((bool)(resources.GetObject("btnProLine.Visible")));
            this.btnProLine.Click += new System.EventHandler(this.btnProLine_Click);
            // 
            // txtFGoodsCode
            // 
            this.txtFGoodsCode.AccessibleDescription = resources.GetString("txtFGoodsCode.AccessibleDescription");
            this.txtFGoodsCode.AccessibleName = resources.GetString("txtFGoodsCode.AccessibleName");
            this.txtFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtFGoodsCode.Anchor")));
            this.txtFGoodsCode.AutoSize = ((bool)(resources.GetObject("txtFGoodsCode.AutoSize")));
            this.txtFGoodsCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtFGoodsCode.BackgroundImage")));
            this.txtFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtFGoodsCode.Dock")));
            this.txtFGoodsCode.Enabled = ((bool)(resources.GetObject("txtFGoodsCode.Enabled")));
            this.txtFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("txtFGoodsCode.Font")));
            this.txtFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtFGoodsCode.ImeMode")));
            this.txtFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("txtFGoodsCode.Location")));
            this.txtFGoodsCode.MaxLength = ((int)(resources.GetObject("txtFGoodsCode.MaxLength")));
            this.txtFGoodsCode.Multiline = ((bool)(resources.GetObject("txtFGoodsCode.Multiline")));
            this.txtFGoodsCode.Name = "txtFGoodsCode";
            this.txtFGoodsCode.PasswordChar = ((char)(resources.GetObject("txtFGoodsCode.PasswordChar")));
            this.txtFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtFGoodsCode.RightToLeft")));
            this.txtFGoodsCode.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtFGoodsCode.ScrollBars")));
            this.txtFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("txtFGoodsCode.Size")));
            this.txtFGoodsCode.TabIndex = ((int)(resources.GetObject("txtFGoodsCode.TabIndex")));
            this.txtFGoodsCode.Text = resources.GetString("txtFGoodsCode.Text");
            this.txtFGoodsCode.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtFGoodsCode.TextAlign")));
            this.txtFGoodsCode.Visible = ((bool)(resources.GetObject("txtFGoodsCode.Visible")));
            this.txtFGoodsCode.WordWrap = ((bool)(resources.GetObject("txtFGoodsCode.WordWrap")));
            this.txtFGoodsCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtFGoodsCode_KeyDown);
            this.txtFGoodsCode.Validating += new System.ComponentModel.CancelEventHandler(this.txtFGoodsCode_Validating);
            // 
            // lblFGoodsCode
            // 
            this.lblFGoodsCode.AccessibleDescription = resources.GetString("lblFGoodsCode.AccessibleDescription");
            this.lblFGoodsCode.AccessibleName = resources.GetString("lblFGoodsCode.AccessibleName");
            this.lblFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblFGoodsCode.Anchor")));
            this.lblFGoodsCode.AutoSize = ((bool)(resources.GetObject("lblFGoodsCode.AutoSize")));
            this.lblFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblFGoodsCode.Dock")));
            this.lblFGoodsCode.Enabled = ((bool)(resources.GetObject("lblFGoodsCode.Enabled")));
            this.lblFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("lblFGoodsCode.Font")));
            this.lblFGoodsCode.ForeColor = System.Drawing.Color.Maroon;
            this.lblFGoodsCode.Image = ((System.Drawing.Image)(resources.GetObject("lblFGoodsCode.Image")));
            this.lblFGoodsCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFGoodsCode.ImageAlign")));
            this.lblFGoodsCode.ImageIndex = ((int)(resources.GetObject("lblFGoodsCode.ImageIndex")));
            this.lblFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblFGoodsCode.ImeMode")));
            this.lblFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("lblFGoodsCode.Location")));
            this.lblFGoodsCode.Name = "lblFGoodsCode";
            this.lblFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblFGoodsCode.RightToLeft")));
            this.lblFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("lblFGoodsCode.Size")));
            this.lblFGoodsCode.TabIndex = ((int)(resources.GetObject("lblFGoodsCode.TabIndex")));
            this.lblFGoodsCode.Tag = "0";
            this.lblFGoodsCode.Text = resources.GetString("lblFGoodsCode.Text");
            this.lblFGoodsCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFGoodsCode.TextAlign")));
            this.lblFGoodsCode.Visible = ((bool)(resources.GetObject("lblFGoodsCode.Visible")));
            // 
            // txtProLine
            // 
            this.txtProLine.AccessibleDescription = resources.GetString("txtProLine.AccessibleDescription");
            this.txtProLine.AccessibleName = resources.GetString("txtProLine.AccessibleName");
            this.txtProLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtProLine.Anchor")));
            this.txtProLine.AutoSize = ((bool)(resources.GetObject("txtProLine.AutoSize")));
            this.txtProLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtProLine.BackgroundImage")));
            this.txtProLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtProLine.Dock")));
            this.txtProLine.Enabled = ((bool)(resources.GetObject("txtProLine.Enabled")));
            this.txtProLine.Font = ((System.Drawing.Font)(resources.GetObject("txtProLine.Font")));
            this.txtProLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtProLine.ImeMode")));
            this.txtProLine.Location = ((System.Drawing.Point)(resources.GetObject("txtProLine.Location")));
            this.txtProLine.MaxLength = ((int)(resources.GetObject("txtProLine.MaxLength")));
            this.txtProLine.Multiline = ((bool)(resources.GetObject("txtProLine.Multiline")));
            this.txtProLine.Name = "txtProLine";
            this.txtProLine.PasswordChar = ((char)(resources.GetObject("txtProLine.PasswordChar")));
            this.txtProLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtProLine.RightToLeft")));
            this.txtProLine.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtProLine.ScrollBars")));
            this.txtProLine.Size = ((System.Drawing.Size)(resources.GetObject("txtProLine.Size")));
            this.txtProLine.TabIndex = ((int)(resources.GetObject("txtProLine.TabIndex")));
            this.txtProLine.Text = resources.GetString("txtProLine.Text");
            this.txtProLine.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtProLine.TextAlign")));
            this.txtProLine.Visible = ((bool)(resources.GetObject("txtProLine.Visible")));
            this.txtProLine.WordWrap = ((bool)(resources.GetObject("txtProLine.WordWrap")));
            this.txtProLine.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtProLine_KeyDown);
            this.txtProLine.Validating += new System.ComponentModel.CancelEventHandler(this.txtProLine_Validating);
            // 
            // lblProLine
            // 
            this.lblProLine.AccessibleDescription = resources.GetString("lblProLine.AccessibleDescription");
            this.lblProLine.AccessibleName = resources.GetString("lblProLine.AccessibleName");
            this.lblProLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblProLine.Anchor")));
            this.lblProLine.AutoSize = ((bool)(resources.GetObject("lblProLine.AutoSize")));
            this.lblProLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblProLine.Dock")));
            this.lblProLine.Enabled = ((bool)(resources.GetObject("lblProLine.Enabled")));
            this.lblProLine.Font = ((System.Drawing.Font)(resources.GetObject("lblProLine.Font")));
            this.lblProLine.ForeColor = System.Drawing.Color.Maroon;
            this.lblProLine.Image = ((System.Drawing.Image)(resources.GetObject("lblProLine.Image")));
            this.lblProLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProLine.ImageAlign")));
            this.lblProLine.ImageIndex = ((int)(resources.GetObject("lblProLine.ImageIndex")));
            this.lblProLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblProLine.ImeMode")));
            this.lblProLine.Location = ((System.Drawing.Point)(resources.GetObject("lblProLine.Location")));
            this.lblProLine.Name = "lblProLine";
            this.lblProLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblProLine.RightToLeft")));
            this.lblProLine.Size = ((System.Drawing.Size)(resources.GetObject("lblProLine.Size")));
            this.lblProLine.TabIndex = ((int)(resources.GetObject("lblProLine.TabIndex")));
            this.lblProLine.Tag = "0";
            this.lblProLine.Text = resources.GetString("lblProLine.Text");
            this.lblProLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProLine.TextAlign")));
            this.lblProLine.Visible = ((bool)(resources.GetObject("lblProLine.Visible")));
            // 
            // btnWOLine
            // 
            this.btnWOLine.AccessibleDescription = resources.GetString("btnWOLine.AccessibleDescription");
            this.btnWOLine.AccessibleName = resources.GetString("btnWOLine.AccessibleName");
            this.btnWOLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnWOLine.Anchor")));
            this.btnWOLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnWOLine.BackgroundImage")));
            this.btnWOLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnWOLine.Dock")));
            this.btnWOLine.Enabled = ((bool)(resources.GetObject("btnWOLine.Enabled")));
            this.btnWOLine.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnWOLine.FlatStyle")));
            this.btnWOLine.Font = ((System.Drawing.Font)(resources.GetObject("btnWOLine.Font")));
            this.btnWOLine.Image = ((System.Drawing.Image)(resources.GetObject("btnWOLine.Image")));
            this.btnWOLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnWOLine.ImageAlign")));
            this.btnWOLine.ImageIndex = ((int)(resources.GetObject("btnWOLine.ImageIndex")));
            this.btnWOLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnWOLine.ImeMode")));
            this.btnWOLine.Location = ((System.Drawing.Point)(resources.GetObject("btnWOLine.Location")));
            this.btnWOLine.Name = "btnWOLine";
            this.btnWOLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnWOLine.RightToLeft")));
            this.btnWOLine.Size = ((System.Drawing.Size)(resources.GetObject("btnWOLine.Size")));
            this.btnWOLine.TabIndex = ((int)(resources.GetObject("btnWOLine.TabIndex")));
            this.btnWOLine.Text = resources.GetString("btnWOLine.Text");
            this.btnWOLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnWOLine.TextAlign")));
            this.btnWOLine.Visible = ((bool)(resources.GetObject("btnWOLine.Visible")));
            this.btnWOLine.Click += new System.EventHandler(this.btnWOLine_Click);
            // 
            // txtWOLine
            // 
            this.txtWOLine.AccessibleDescription = resources.GetString("txtWOLine.AccessibleDescription");
            this.txtWOLine.AccessibleName = resources.GetString("txtWOLine.AccessibleName");
            this.txtWOLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtWOLine.Anchor")));
            this.txtWOLine.AutoSize = ((bool)(resources.GetObject("txtWOLine.AutoSize")));
            this.txtWOLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtWOLine.BackgroundImage")));
            this.txtWOLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtWOLine.Dock")));
            this.txtWOLine.Enabled = ((bool)(resources.GetObject("txtWOLine.Enabled")));
            this.txtWOLine.Font = ((System.Drawing.Font)(resources.GetObject("txtWOLine.Font")));
            this.txtWOLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtWOLine.ImeMode")));
            this.txtWOLine.Location = ((System.Drawing.Point)(resources.GetObject("txtWOLine.Location")));
            this.txtWOLine.MaxLength = ((int)(resources.GetObject("txtWOLine.MaxLength")));
            this.txtWOLine.Multiline = ((bool)(resources.GetObject("txtWOLine.Multiline")));
            this.txtWOLine.Name = "txtWOLine";
            this.txtWOLine.PasswordChar = ((char)(resources.GetObject("txtWOLine.PasswordChar")));
            this.txtWOLine.ReadOnly = true;
            this.txtWOLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtWOLine.RightToLeft")));
            this.txtWOLine.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtWOLine.ScrollBars")));
            this.txtWOLine.Size = ((System.Drawing.Size)(resources.GetObject("txtWOLine.Size")));
            this.txtWOLine.TabIndex = ((int)(resources.GetObject("txtWOLine.TabIndex")));
            this.txtWOLine.Text = resources.GetString("txtWOLine.Text");
            this.txtWOLine.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtWOLine.TextAlign")));
            this.txtWOLine.Visible = ((bool)(resources.GetObject("txtWOLine.Visible")));
            this.txtWOLine.WordWrap = ((bool)(resources.GetObject("txtWOLine.WordWrap")));
            // 
            // lblWOLine
            // 
            this.lblWOLine.AccessibleDescription = resources.GetString("lblWOLine.AccessibleDescription");
            this.lblWOLine.AccessibleName = resources.GetString("lblWOLine.AccessibleName");
            this.lblWOLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblWOLine.Anchor")));
            this.lblWOLine.AutoSize = ((bool)(resources.GetObject("lblWOLine.AutoSize")));
            this.lblWOLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblWOLine.Dock")));
            this.lblWOLine.Enabled = ((bool)(resources.GetObject("lblWOLine.Enabled")));
            this.lblWOLine.Font = ((System.Drawing.Font)(resources.GetObject("lblWOLine.Font")));
            this.lblWOLine.ForeColor = System.Drawing.Color.Maroon;
            this.lblWOLine.Image = ((System.Drawing.Image)(resources.GetObject("lblWOLine.Image")));
            this.lblWOLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblWOLine.ImageAlign")));
            this.lblWOLine.ImageIndex = ((int)(resources.GetObject("lblWOLine.ImageIndex")));
            this.lblWOLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblWOLine.ImeMode")));
            this.lblWOLine.Location = ((System.Drawing.Point)(resources.GetObject("lblWOLine.Location")));
            this.lblWOLine.Name = "lblWOLine";
            this.lblWOLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblWOLine.RightToLeft")));
            this.lblWOLine.Size = ((System.Drawing.Size)(resources.GetObject("lblWOLine.Size")));
            this.lblWOLine.TabIndex = ((int)(resources.GetObject("lblWOLine.TabIndex")));
            this.lblWOLine.Tag = "0";
            this.lblWOLine.Text = resources.GetString("lblWOLine.Text");
            this.lblWOLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblWOLine.TextAlign")));
            this.lblWOLine.Visible = ((bool)(resources.GetObject("lblWOLine.Visible")));
            // 
            // btnFromLoc
            // 
            this.btnFromLoc.AccessibleDescription = resources.GetString("btnFromLoc.AccessibleDescription");
            this.btnFromLoc.AccessibleName = resources.GetString("btnFromLoc.AccessibleName");
            this.btnFromLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnFromLoc.Anchor")));
            this.btnFromLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnFromLoc.BackgroundImage")));
            this.btnFromLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnFromLoc.Dock")));
            this.btnFromLoc.Enabled = ((bool)(resources.GetObject("btnFromLoc.Enabled")));
            this.btnFromLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnFromLoc.FlatStyle")));
            this.btnFromLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnFromLoc.Font")));
            this.btnFromLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnFromLoc.Image")));
            this.btnFromLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFromLoc.ImageAlign")));
            this.btnFromLoc.ImageIndex = ((int)(resources.GetObject("btnFromLoc.ImageIndex")));
            this.btnFromLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnFromLoc.ImeMode")));
            this.btnFromLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnFromLoc.Location")));
            this.btnFromLoc.Name = "btnFromLoc";
            this.btnFromLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnFromLoc.RightToLeft")));
            this.btnFromLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnFromLoc.Size")));
            this.btnFromLoc.TabIndex = ((int)(resources.GetObject("btnFromLoc.TabIndex")));
            this.btnFromLoc.Text = resources.GetString("btnFromLoc.Text");
            this.btnFromLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFromLoc.TextAlign")));
            this.btnFromLoc.Visible = ((bool)(resources.GetObject("btnFromLoc.Visible")));
            this.btnFromLoc.Click += new System.EventHandler(this.btnFromLoc_Click);
            // 
            // txtFromLoc
            // 
            this.txtFromLoc.AccessibleDescription = resources.GetString("txtFromLoc.AccessibleDescription");
            this.txtFromLoc.AccessibleName = resources.GetString("txtFromLoc.AccessibleName");
            this.txtFromLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtFromLoc.Anchor")));
            this.txtFromLoc.AutoSize = ((bool)(resources.GetObject("txtFromLoc.AutoSize")));
            this.txtFromLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtFromLoc.BackgroundImage")));
            this.txtFromLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtFromLoc.Dock")));
            this.txtFromLoc.Enabled = ((bool)(resources.GetObject("txtFromLoc.Enabled")));
            this.txtFromLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtFromLoc.Font")));
            this.txtFromLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtFromLoc.ImeMode")));
            this.txtFromLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtFromLoc.Location")));
            this.txtFromLoc.MaxLength = ((int)(resources.GetObject("txtFromLoc.MaxLength")));
            this.txtFromLoc.Multiline = ((bool)(resources.GetObject("txtFromLoc.Multiline")));
            this.txtFromLoc.Name = "txtFromLoc";
            this.txtFromLoc.PasswordChar = ((char)(resources.GetObject("txtFromLoc.PasswordChar")));
            this.txtFromLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtFromLoc.RightToLeft")));
            this.txtFromLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtFromLoc.ScrollBars")));
            this.txtFromLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtFromLoc.Size")));
            this.txtFromLoc.TabIndex = ((int)(resources.GetObject("txtFromLoc.TabIndex")));
            this.txtFromLoc.Text = resources.GetString("txtFromLoc.Text");
            this.txtFromLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtFromLoc.TextAlign")));
            this.txtFromLoc.Visible = ((bool)(resources.GetObject("txtFromLoc.Visible")));
            this.txtFromLoc.WordWrap = ((bool)(resources.GetObject("txtFromLoc.WordWrap")));
            this.txtFromLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtFromLoc_KeyDown);
            this.txtFromLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtFromLoc_Validating);
            // 
            // lblFromLoc
            // 
            this.lblFromLoc.AccessibleDescription = resources.GetString("lblFromLoc.AccessibleDescription");
            this.lblFromLoc.AccessibleName = resources.GetString("lblFromLoc.AccessibleName");
            this.lblFromLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblFromLoc.Anchor")));
            this.lblFromLoc.AutoSize = ((bool)(resources.GetObject("lblFromLoc.AutoSize")));
            this.lblFromLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblFromLoc.Dock")));
            this.lblFromLoc.Enabled = ((bool)(resources.GetObject("lblFromLoc.Enabled")));
            this.lblFromLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblFromLoc.Font")));
            this.lblFromLoc.ForeColor = System.Drawing.Color.Maroon;
            this.lblFromLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblFromLoc.Image")));
            this.lblFromLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFromLoc.ImageAlign")));
            this.lblFromLoc.ImageIndex = ((int)(resources.GetObject("lblFromLoc.ImageIndex")));
            this.lblFromLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblFromLoc.ImeMode")));
            this.lblFromLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblFromLoc.Location")));
            this.lblFromLoc.Name = "lblFromLoc";
            this.lblFromLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblFromLoc.RightToLeft")));
            this.lblFromLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblFromLoc.Size")));
            this.lblFromLoc.TabIndex = ((int)(resources.GetObject("lblFromLoc.TabIndex")));
            this.lblFromLoc.Tag = "0";
            this.lblFromLoc.Text = resources.GetString("lblFromLoc.Text");
            this.lblFromLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFromLoc.TextAlign")));
            this.lblFromLoc.Visible = ((bool)(resources.GetObject("lblFromLoc.Visible")));
            // 
            // btnFromBin
            // 
            this.btnFromBin.AccessibleDescription = resources.GetString("btnFromBin.AccessibleDescription");
            this.btnFromBin.AccessibleName = resources.GetString("btnFromBin.AccessibleName");
            this.btnFromBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnFromBin.Anchor")));
            this.btnFromBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnFromBin.BackgroundImage")));
            this.btnFromBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnFromBin.Dock")));
            this.btnFromBin.Enabled = ((bool)(resources.GetObject("btnFromBin.Enabled")));
            this.btnFromBin.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnFromBin.FlatStyle")));
            this.btnFromBin.Font = ((System.Drawing.Font)(resources.GetObject("btnFromBin.Font")));
            this.btnFromBin.Image = ((System.Drawing.Image)(resources.GetObject("btnFromBin.Image")));
            this.btnFromBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFromBin.ImageAlign")));
            this.btnFromBin.ImageIndex = ((int)(resources.GetObject("btnFromBin.ImageIndex")));
            this.btnFromBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnFromBin.ImeMode")));
            this.btnFromBin.Location = ((System.Drawing.Point)(resources.GetObject("btnFromBin.Location")));
            this.btnFromBin.Name = "btnFromBin";
            this.btnFromBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnFromBin.RightToLeft")));
            this.btnFromBin.Size = ((System.Drawing.Size)(resources.GetObject("btnFromBin.Size")));
            this.btnFromBin.TabIndex = ((int)(resources.GetObject("btnFromBin.TabIndex")));
            this.btnFromBin.Text = resources.GetString("btnFromBin.Text");
            this.btnFromBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFromBin.TextAlign")));
            this.btnFromBin.Visible = ((bool)(resources.GetObject("btnFromBin.Visible")));
            this.btnFromBin.Click += new System.EventHandler(this.btnFromBin_Click);
            // 
            // txtFromBin
            // 
            this.txtFromBin.AccessibleDescription = resources.GetString("txtFromBin.AccessibleDescription");
            this.txtFromBin.AccessibleName = resources.GetString("txtFromBin.AccessibleName");
            this.txtFromBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtFromBin.Anchor")));
            this.txtFromBin.AutoSize = ((bool)(resources.GetObject("txtFromBin.AutoSize")));
            this.txtFromBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtFromBin.BackgroundImage")));
            this.txtFromBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtFromBin.Dock")));
            this.txtFromBin.Enabled = ((bool)(resources.GetObject("txtFromBin.Enabled")));
            this.txtFromBin.Font = ((System.Drawing.Font)(resources.GetObject("txtFromBin.Font")));
            this.txtFromBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtFromBin.ImeMode")));
            this.txtFromBin.Location = ((System.Drawing.Point)(resources.GetObject("txtFromBin.Location")));
            this.txtFromBin.MaxLength = ((int)(resources.GetObject("txtFromBin.MaxLength")));
            this.txtFromBin.Multiline = ((bool)(resources.GetObject("txtFromBin.Multiline")));
            this.txtFromBin.Name = "txtFromBin";
            this.txtFromBin.PasswordChar = ((char)(resources.GetObject("txtFromBin.PasswordChar")));
            this.txtFromBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtFromBin.RightToLeft")));
            this.txtFromBin.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtFromBin.ScrollBars")));
            this.txtFromBin.Size = ((System.Drawing.Size)(resources.GetObject("txtFromBin.Size")));
            this.txtFromBin.TabIndex = ((int)(resources.GetObject("txtFromBin.TabIndex")));
            this.txtFromBin.Text = resources.GetString("txtFromBin.Text");
            this.txtFromBin.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtFromBin.TextAlign")));
            this.txtFromBin.Visible = ((bool)(resources.GetObject("txtFromBin.Visible")));
            this.txtFromBin.WordWrap = ((bool)(resources.GetObject("txtFromBin.WordWrap")));
            this.txtFromBin.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtFromBin_KeyDown);
            this.txtFromBin.Validating += new System.ComponentModel.CancelEventHandler(this.txtFromBin_Validating);
            // 
            // lblFromBin
            // 
            this.lblFromBin.AccessibleDescription = resources.GetString("lblFromBin.AccessibleDescription");
            this.lblFromBin.AccessibleName = resources.GetString("lblFromBin.AccessibleName");
            this.lblFromBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblFromBin.Anchor")));
            this.lblFromBin.AutoSize = ((bool)(resources.GetObject("lblFromBin.AutoSize")));
            this.lblFromBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblFromBin.Dock")));
            this.lblFromBin.Enabled = ((bool)(resources.GetObject("lblFromBin.Enabled")));
            this.lblFromBin.Font = ((System.Drawing.Font)(resources.GetObject("lblFromBin.Font")));
            this.lblFromBin.ForeColor = System.Drawing.Color.Maroon;
            this.lblFromBin.Image = ((System.Drawing.Image)(resources.GetObject("lblFromBin.Image")));
            this.lblFromBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFromBin.ImageAlign")));
            this.lblFromBin.ImageIndex = ((int)(resources.GetObject("lblFromBin.ImageIndex")));
            this.lblFromBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblFromBin.ImeMode")));
            this.lblFromBin.Location = ((System.Drawing.Point)(resources.GetObject("lblFromBin.Location")));
            this.lblFromBin.Name = "lblFromBin";
            this.lblFromBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblFromBin.RightToLeft")));
            this.lblFromBin.Size = ((System.Drawing.Size)(resources.GetObject("lblFromBin.Size")));
            this.lblFromBin.TabIndex = ((int)(resources.GetObject("lblFromBin.TabIndex")));
            this.lblFromBin.Tag = "0";
            this.lblFromBin.Text = resources.GetString("lblFromBin.Text");
            this.lblFromBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFromBin.TextAlign")));
            this.lblFromBin.Visible = ((bool)(resources.GetObject("lblFromBin.Visible")));
            // 
            // dgrdData
            // 
            this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
            this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
            this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
            this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
            this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
            this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
            this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
            this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
            this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
            this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
            this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
            this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
            this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
            this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
            this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
            this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
            this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
            this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
            this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
            this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
            this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
            this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
            this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
            this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
            this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
            this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
            this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
            this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
            this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
            this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
            this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
            this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
            this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
            this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
            this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
            this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
            this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
            this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
            this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
            this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
            this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
            this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
            this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
            this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
            this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
            this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
            this.dgrdData.Name = "dgrdData";
            this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
            this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
            this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
            this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
            this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
            this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
            this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
            this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
            this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
            this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
            this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
            this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
            this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
            this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
            this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
            this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
            this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
            this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
            this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
            this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
            this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
            this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
            this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
            this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
            this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
            this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
            this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
            this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
            this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
            this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
            this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
            this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
            this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
            this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
            this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
            this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
            this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
            this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
            this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
            this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
            this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
            this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
            this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
            this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
            this.dgrdData.Text = resources.GetString("dgrdData.Text");
            this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
            this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
            this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
            this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
            this.dgrdData.ButtonClick += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_ButtonClick);
            this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
            this.dgrdData.BeforeColUpdate += new C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler(this.dgrdData_BeforeColUpdate);
            this.dgrdData.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dgrdData_KeyDown);
            this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
            // 
            // btnAdd
            // 
            this.btnAdd.AccessibleDescription = resources.GetString("btnAdd.AccessibleDescription");
            this.btnAdd.AccessibleName = resources.GetString("btnAdd.AccessibleName");
            this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnAdd.Anchor")));
            this.btnAdd.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnAdd.BackgroundImage")));
            this.btnAdd.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnAdd.Dock")));
            this.btnAdd.Enabled = ((bool)(resources.GetObject("btnAdd.Enabled")));
            this.btnAdd.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnAdd.FlatStyle")));
            this.btnAdd.Font = ((System.Drawing.Font)(resources.GetObject("btnAdd.Font")));
            this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image")));
            this.btnAdd.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.ImageAlign")));
            this.btnAdd.ImageIndex = ((int)(resources.GetObject("btnAdd.ImageIndex")));
            this.btnAdd.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnAdd.ImeMode")));
            this.btnAdd.Location = ((System.Drawing.Point)(resources.GetObject("btnAdd.Location")));
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnAdd.RightToLeft")));
            this.btnAdd.Size = ((System.Drawing.Size)(resources.GetObject("btnAdd.Size")));
            this.btnAdd.TabIndex = ((int)(resources.GetObject("btnAdd.TabIndex")));
            this.btnAdd.Text = resources.GetString("btnAdd.Text");
            this.btnAdd.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.TextAlign")));
            this.btnAdd.Visible = ((bool)(resources.GetObject("btnAdd.Visible")));
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            // 
            // btnEdit
            // 
            this.btnEdit.AccessibleDescription = resources.GetString("btnEdit.AccessibleDescription");
            this.btnEdit.AccessibleName = resources.GetString("btnEdit.AccessibleName");
            this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnEdit.Anchor")));
            this.btnEdit.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnEdit.BackgroundImage")));
            this.btnEdit.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnEdit.Dock")));
            this.btnEdit.Enabled = ((bool)(resources.GetObject("btnEdit.Enabled")));
            this.btnEdit.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnEdit.FlatStyle")));
            this.btnEdit.Font = ((System.Drawing.Font)(resources.GetObject("btnEdit.Font")));
            this.btnEdit.Image = ((System.Drawing.Image)(resources.GetObject("btnEdit.Image")));
            this.btnEdit.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnEdit.ImageAlign")));
            this.btnEdit.ImageIndex = ((int)(resources.GetObject("btnEdit.ImageIndex")));
            this.btnEdit.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnEdit.ImeMode")));
            this.btnEdit.Location = ((System.Drawing.Point)(resources.GetObject("btnEdit.Location")));
            this.btnEdit.Name = "btnEdit";
            this.btnEdit.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnEdit.RightToLeft")));
            this.btnEdit.Size = ((System.Drawing.Size)(resources.GetObject("btnEdit.Size")));
            this.btnEdit.TabIndex = ((int)(resources.GetObject("btnEdit.TabIndex")));
            this.btnEdit.Text = resources.GetString("btnEdit.Text");
            this.btnEdit.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnEdit.TextAlign")));
            this.btnEdit.Visible = ((bool)(resources.GetObject("btnEdit.Visible")));
            this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
            // 
            // btnDelete
            // 
            this.btnDelete.AccessibleDescription = resources.GetString("btnDelete.AccessibleDescription");
            this.btnDelete.AccessibleName = resources.GetString("btnDelete.AccessibleName");
            this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDelete.Anchor")));
            this.btnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDelete.BackgroundImage")));
            this.btnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDelete.Dock")));
            this.btnDelete.Enabled = ((bool)(resources.GetObject("btnDelete.Enabled")));
            this.btnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDelete.FlatStyle")));
            this.btnDelete.Font = ((System.Drawing.Font)(resources.GetObject("btnDelete.Font")));
            this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image")));
            this.btnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.ImageAlign")));
            this.btnDelete.ImageIndex = ((int)(resources.GetObject("btnDelete.ImageIndex")));
            this.btnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDelete.ImeMode")));
            this.btnDelete.Location = ((System.Drawing.Point)(resources.GetObject("btnDelete.Location")));
            this.btnDelete.Name = "btnDelete";
            this.btnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDelete.RightToLeft")));
            this.btnDelete.Size = ((System.Drawing.Size)(resources.GetObject("btnDelete.Size")));
            this.btnDelete.TabIndex = ((int)(resources.GetObject("btnDelete.TabIndex")));
            this.btnDelete.Text = resources.GetString("btnDelete.Text");
            this.btnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.TextAlign")));
            this.btnDelete.Visible = ((bool)(resources.GetObject("btnDelete.Visible")));
            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
            // 
            // btnSave
            // 
            this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
            this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
            this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
            this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
            this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
            this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
            this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
            this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
            this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
            this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
            this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
            this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
            this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
            this.btnSave.Name = "btnSave";
            this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
            this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
            this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
            this.btnSave.Text = resources.GetString("btnSave.Text");
            this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
            this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
            // 
            // btnClose
            // 
            this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
            this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
            this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
            this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
            this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
            this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
            this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
            this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
            this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
            this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
            this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
            this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
            this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
            this.btnClose.Name = "btnClose";
            this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
            this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
            this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
            this.btnClose.Text = resources.GetString("btnClose.Text");
            this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
            this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            // 
            // btnHelp
            // 
            this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
            this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
            this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
            this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
            this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
            this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
            this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
            this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
            this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
            this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
            this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
            this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
            this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
            this.btnHelp.Name = "btnHelp";
            this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
            this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
            this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
            this.btnHelp.Text = resources.GetString("btnHelp.Text");
            this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
            this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
            this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
            // 
            // dtmPostDate
            // 
            this.dtmPostDate.AcceptsEscape = ((bool)(resources.GetObject("dtmPostDate.AcceptsEscape")));
            this.dtmPostDate.AccessibleDescription = resources.GetString("dtmPostDate.AccessibleDescription");
            this.dtmPostDate.AccessibleName = resources.GetString("dtmPostDate.AccessibleName");
            this.dtmPostDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmPostDate.Anchor")));
            this.dtmPostDate.AutoSize = ((bool)(resources.GetObject("dtmPostDate.AutoSize")));
            this.dtmPostDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.BackgroundImage")));
            this.dtmPostDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmPostDate.BorderStyle")));
            // 
            // dtmPostDate.Calendar
            // 
            this.dtmPostDate.Calendar.AccessibleDescription = resources.GetString("dtmPostDate.Calendar.AccessibleDescription");
            this.dtmPostDate.Calendar.AccessibleName = resources.GetString("dtmPostDate.Calendar.AccessibleName");
            this.dtmPostDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.AnnuallyBoldedDates")));
            this.dtmPostDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.Calendar.BackgroundImage")));
            this.dtmPostDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.BoldedDates")));
            this.dtmPostDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Calendar.CalendarDimensions")));
            this.dtmPostDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmPostDate.Calendar.Enabled")));
            this.dtmPostDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmPostDate.Calendar.FirstDayOfWeek")));
            this.dtmPostDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Calendar.Font")));
            this.dtmPostDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.Calendar.ImeMode")));
            this.dtmPostDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.MonthlyBoldedDates")));
            this.dtmPostDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.Calendar.RightToLeft")));
            this.dtmPostDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowClearButton")));
            this.dtmPostDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowTodayButton")));
            this.dtmPostDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowWeekNumbers")));
            this.dtmPostDate.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.CaseSensitive")));
            this.dtmPostDate.Culture = ((int)(resources.GetObject("dtmPostDate.Culture")));
            this.dtmPostDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmPostDate.CurrentTimeZone")));
            this.dtmPostDate.CustomFormat = resources.GetString("dtmPostDate.CustomFormat");
            this.dtmPostDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmPostDate.DaylightTimeAdjustment")));
            this.dtmPostDate.DisplayFormat.CustomFormat = resources.GetString("dtmPostDate.DisplayFormat.CustomFormat");
            this.dtmPostDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.DisplayFormat.FormatType")));
            this.dtmPostDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.DisplayFormat.Inherit")));
            this.dtmPostDate.DisplayFormat.NullText = resources.GetString("dtmPostDate.DisplayFormat.NullText");
            this.dtmPostDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimEnd")));
            this.dtmPostDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimStart")));
            this.dtmPostDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmPostDate.Dock")));
            this.dtmPostDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmPostDate.DropDownFormAlign")));
            this.dtmPostDate.EditFormat.CustomFormat = resources.GetString("dtmPostDate.EditFormat.CustomFormat");
            this.dtmPostDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.EditFormat.FormatType")));
            this.dtmPostDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.EditFormat.Inherit")));
            this.dtmPostDate.EditFormat.NullText = resources.GetString("dtmPostDate.EditFormat.NullText");
            this.dtmPostDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimEnd")));
            this.dtmPostDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimStart")));
            this.dtmPostDate.EditMask = resources.GetString("dtmPostDate.EditMask");
            this.dtmPostDate.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.EmptyAsNull")));
            this.dtmPostDate.Enabled = ((bool)(resources.GetObject("dtmPostDate.Enabled")));
            this.dtmPostDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.BeepOnError")));
            this.dtmPostDate.ErrorInfo.ErrorMessage = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessage");
            this.dtmPostDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessageCaption");
            this.dtmPostDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.ShowErrorMessage")));
            this.dtmPostDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmPostDate.ErrorInfo.ValueOnError")));
            this.dtmPostDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Font")));
            this.dtmPostDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.FormatType")));
            this.dtmPostDate.GapHeight = ((int)(resources.GetObject("dtmPostDate.GapHeight")));
            this.dtmPostDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmPostDate.GMTOffset")));
            this.dtmPostDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.ImeMode")));
            this.dtmPostDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmPostDate.InitialSelection")));
            this.dtmPostDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmPostDate.Location")));
            this.dtmPostDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.AutoTabWhenFilled")));
            this.dtmPostDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CaseSensitive")));
            this.dtmPostDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CopyWithLiterals")));
            this.dtmPostDate.MaskInfo.EditMask = resources.GetString("dtmPostDate.MaskInfo.EditMask");
            this.dtmPostDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.EmptyAsNull")));
            this.dtmPostDate.MaskInfo.ErrorMessage = resources.GetString("dtmPostDate.MaskInfo.ErrorMessage");
            this.dtmPostDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmPostDate.MaskInfo.Inherit")));
            this.dtmPostDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.PromptChar")));
            this.dtmPostDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmPostDate.MaskInfo.ShowLiterals")));
            this.dtmPostDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.StoredEmptyChar")));
            this.dtmPostDate.MaxLength = ((int)(resources.GetObject("dtmPostDate.MaxLength")));
            this.dtmPostDate.Name = "dtmPostDate";
            this.dtmPostDate.NullText = resources.GetString("dtmPostDate.NullText");
            this.dtmPostDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.CaseSensitive")));
            this.dtmPostDate.ParseInfo.CustomFormat = resources.GetString("dtmPostDate.ParseInfo.CustomFormat");
            this.dtmPostDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmPostDate.ParseInfo.DateTimeStyle")));
            this.dtmPostDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.EmptyAsNull")));
            this.dtmPostDate.ParseInfo.ErrorMessage = resources.GetString("dtmPostDate.ParseInfo.ErrorMessage");
            this.dtmPostDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.ParseInfo.FormatType")));
            this.dtmPostDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmPostDate.ParseInfo.Inherit")));
            this.dtmPostDate.ParseInfo.NullText = resources.GetString("dtmPostDate.ParseInfo.NullText");
            this.dtmPostDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimEnd")));
            this.dtmPostDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimStart")));
            this.dtmPostDate.PasswordChar = ((char)(resources.GetObject("dtmPostDate.PasswordChar")));
            this.dtmPostDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PostValidation.CaseSensitive")));
            this.dtmPostDate.PostValidation.ErrorMessage = resources.GetString("dtmPostDate.PostValidation.ErrorMessage");
            this.dtmPostDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmPostDate.PostValidation.Inherit")));
            this.dtmPostDate.PostValidation.Intervals.AddRange(new C1.Win.C1Input.ValueInterval[] {
																									  ((C1.Win.C1Input.ValueInterval)(resources.GetObject("dtmPostDate.PostValidation.Intervals")))});
            this.dtmPostDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmPostDate.PostValidation.Validation")));
            this.dtmPostDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.Values")));
            this.dtmPostDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.ValuesExcluded")));
            this.dtmPostDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PreValidation.CaseSensitive")));
            this.dtmPostDate.PreValidation.ErrorMessage = resources.GetString("dtmPostDate.PreValidation.ErrorMessage");
            this.dtmPostDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmPostDate.PreValidation.Inherit")));
            this.dtmPostDate.PreValidation.ItemSeparator = resources.GetString("dtmPostDate.PreValidation.ItemSeparator");
            this.dtmPostDate.PreValidation.PatternString = resources.GetString("dtmPostDate.PreValidation.PatternString");
            this.dtmPostDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmPostDate.PreValidation.RegexOptions")));
            this.dtmPostDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimEnd")));
            this.dtmPostDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimStart")));
            this.dtmPostDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmPostDate.PreValidation.Validation")));
            this.dtmPostDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.RightToLeft")));
            this.dtmPostDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmPostDate.ShowFocusRectangle")));
            this.dtmPostDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Size")));
            this.dtmPostDate.TabIndex = ((int)(resources.GetObject("dtmPostDate.TabIndex")));
            this.dtmPostDate.Tag = ((object)(resources.GetObject("dtmPostDate.Tag")));
            this.dtmPostDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmPostDate.TextAlign")));
            this.dtmPostDate.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.TrimEnd")));
            this.dtmPostDate.TrimStart = ((bool)(resources.GetObject("dtmPostDate.TrimStart")));
            this.dtmPostDate.UserCultureOverride = ((bool)(resources.GetObject("dtmPostDate.UserCultureOverride")));
            this.dtmPostDate.Value = ((object)(resources.GetObject("dtmPostDate.Value")));
            this.dtmPostDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmPostDate.VerticalAlign")));
            this.dtmPostDate.Visible = ((bool)(resources.GetObject("dtmPostDate.Visible")));
            this.dtmPostDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmPostDate.VisibleButtons")));
            // 
            // cboCCN
            // 
            this.cboCCN.AccessibleDescription = resources.GetString("cboCCN.AccessibleDescription");
            this.cboCCN.AccessibleName = resources.GetString("cboCCN.AccessibleName");
            this.cboCCN.AddItemSeparator = ';';
            this.cboCCN.AllowRowSizing = C1.Win.C1List.RowSizingEnum.AllRows;
            this.cboCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboCCN.Anchor")));
            this.cboCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboCCN.BackgroundImage")));
            this.cboCCN.Caption = "";
            this.cboCCN.CaptionHeight = 17;
            this.cboCCN.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal;
            this.cboCCN.ColumnCaptionHeight = 17;
            this.cboCCN.ColumnFooterHeight = 17;
            this.cboCCN.ComboStyle = C1.Win.C1List.ComboStyleEnum.DropdownList;
            this.cboCCN.ContentHeight = 15;
            this.cboCCN.DeadAreaBackColor = System.Drawing.Color.Empty;
            this.cboCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboCCN.Dock")));
            this.cboCCN.EditorBackColor = System.Drawing.SystemColors.Window;
            this.cboCCN.EditorFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.cboCCN.EditorForeColor = System.Drawing.SystemColors.WindowText;
            this.cboCCN.EditorHeight = 15;
            this.cboCCN.Enabled = ((bool)(resources.GetObject("cboCCN.Enabled")));
            this.cboCCN.FlatStyle = C1.Win.C1List.FlatModeEnum.System;
            this.cboCCN.Font = ((System.Drawing.Font)(resources.GetObject("cboCCN.Font")));
            this.cboCCN.GapHeight = 2;
            this.cboCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboCCN.ImeMode")));
            this.cboCCN.ItemHeight = 15;
            this.cboCCN.Location = ((System.Drawing.Point)(resources.GetObject("cboCCN.Location")));
            this.cboCCN.MatchEntryTimeout = ((long)(2000));
            this.cboCCN.MaxDropDownItems = ((short)(5));
            this.cboCCN.MaxLength = 32767;
            this.cboCCN.MouseCursor = System.Windows.Forms.Cursors.Default;
            this.cboCCN.Name = "cboCCN";
            this.cboCCN.PartialRightColumn = false;
            this.cboCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboCCN.RightToLeft")));
            this.cboCCN.RowDivider.Color = System.Drawing.Color.DarkGray;
            this.cboCCN.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;
            this.cboCCN.RowSubDividerColor = System.Drawing.Color.DarkGray;
            this.cboCCN.Size = ((System.Drawing.Size)(resources.GetObject("cboCCN.Size")));
            this.cboCCN.TabIndex = ((int)(resources.GetObject("cboCCN.TabIndex")));
            this.cboCCN.Text = resources.GetString("cboCCN.Text");
            this.cboCCN.Visible = ((bool)(resources.GetObject("cboCCN.Visible")));
            this.cboCCN.PropBag = "<?xml version=\"1.0\"?><Blob><Styles type=\"C1.Win.C1List.Design.ContextWrapper\"><Da" +
                "ta>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}Style2{" +
                "}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{ForeColor:High" +
                "lightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:InactiveCaptionText;Ba" +
                "ckColor:InactiveCaption;}Footer{}Caption{AlignHorz:Center;}Normal{}HighlightRow{" +
                "ForeColor:HighlightText;BackColor:Highlight;}Style1{}OddRow{}RecordSelector{Alig" +
                "nImage:Center;}Heading{Wrap:True;BackColor:Control;Border:Raised,,1, 1, 1, 1;For" +
                "eColor:ControlText;AlignVert:Center;}Style8{}Style10{}Style11{}Style9{AlignHorz:" +
                "Near;}</Data></Styles><Splits><C1.Win.C1List.ListBoxView AllowColSelect=\"False\" " +
                "Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFooterHeight=\"17\" Vert" +
                "icalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 0, 116, 156</Client" +
                "Rect><VScrollBar><Width>17</Width></VScrollBar><HScrollBar><Height>17</Height></" +
                "HScrollBar><CaptionStyle parent=\"Style2\" me=\"Style9\" /><EvenRowStyle parent=\"Eve" +
                "nRow\" me=\"Style7\" /><FooterStyle parent=\"Footer\" me=\"Style3\" /><GroupStyle paren" +
                "t=\"Group\" me=\"Style11\" /><HeadingStyle parent=\"Heading\" me=\"Style2\" /><HighLight" +
                "RowStyle parent=\"HighlightRow\" me=\"Style6\" /><InactiveStyle parent=\"Inactive\" me" +
                "=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style8\" /><RecordSelectorStyle pare" +
                "nt=\"RecordSelector\" me=\"Style10\" /><SelectedStyle parent=\"Selected\" me=\"Style5\" " +
                "/><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1List.ListBoxView></Splits><Nam" +
                "edStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Normal\" me=\"Heading\" /><S" +
                "tyle parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\" me=\"Caption\" /><Styl" +
                "e parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" me=\"Selected\" /><Style" +
                " parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=\"EvenRow\" /><Styl" +
                "e parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"RecordSelector\" /><S" +
                "tyle parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1</vertSplits><horz" +
                "Splits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWidth>16</DefaultRec" +
                "SelWidth></Blob>";
            // 
            // lblCCN
            // 
            this.lblCCN.AccessibleDescription = resources.GetString("lblCCN.AccessibleDescription");
            this.lblCCN.AccessibleName = resources.GetString("lblCCN.AccessibleName");
            this.lblCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCN.Anchor")));
            this.lblCCN.AutoSize = ((bool)(resources.GetObject("lblCCN.AutoSize")));
            this.lblCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCN.Dock")));
            this.lblCCN.Enabled = ((bool)(resources.GetObject("lblCCN.Enabled")));
            this.lblCCN.Font = ((System.Drawing.Font)(resources.GetObject("lblCCN.Font")));
            this.lblCCN.ForeColor = System.Drawing.Color.Maroon;
            this.lblCCN.Image = ((System.Drawing.Image)(resources.GetObject("lblCCN.Image")));
            this.lblCCN.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.ImageAlign")));
            this.lblCCN.ImageIndex = ((int)(resources.GetObject("lblCCN.ImageIndex")));
            this.lblCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCN.ImeMode")));
            this.lblCCN.Location = ((System.Drawing.Point)(resources.GetObject("lblCCN.Location")));
            this.lblCCN.Name = "lblCCN";
            this.lblCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCN.RightToLeft")));
            this.lblCCN.Size = ((System.Drawing.Size)(resources.GetObject("lblCCN.Size")));
            this.lblCCN.TabIndex = ((int)(resources.GetObject("lblCCN.TabIndex")));
            this.lblCCN.Text = resources.GetString("lblCCN.Text");
            this.lblCCN.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.TextAlign")));
            this.lblCCN.Visible = ((bool)(resources.GetObject("lblCCN.Visible")));
            // 
            // txtProductDetail
            // 
            this.txtProductDetail.AccessibleDescription = resources.GetString("txtProductDetail.AccessibleDescription");
            this.txtProductDetail.AccessibleName = resources.GetString("txtProductDetail.AccessibleName");
            this.txtProductDetail.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtProductDetail.Anchor")));
            this.txtProductDetail.AutoSize = ((bool)(resources.GetObject("txtProductDetail.AutoSize")));
            this.txtProductDetail.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtProductDetail.BackgroundImage")));
            this.txtProductDetail.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtProductDetail.Dock")));
            this.txtProductDetail.Enabled = ((bool)(resources.GetObject("txtProductDetail.Enabled")));
            this.txtProductDetail.Font = ((System.Drawing.Font)(resources.GetObject("txtProductDetail.Font")));
            this.txtProductDetail.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtProductDetail.ImeMode")));
            this.txtProductDetail.Location = ((System.Drawing.Point)(resources.GetObject("txtProductDetail.Location")));
            this.txtProductDetail.MaxLength = ((int)(resources.GetObject("txtProductDetail.MaxLength")));
            this.txtProductDetail.Multiline = ((bool)(resources.GetObject("txtProductDetail.Multiline")));
            this.txtProductDetail.Name = "txtProductDetail";
            this.txtProductDetail.PasswordChar = ((char)(resources.GetObject("txtProductDetail.PasswordChar")));
            this.txtProductDetail.ReadOnly = true;
            this.txtProductDetail.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtProductDetail.RightToLeft")));
            this.txtProductDetail.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtProductDetail.ScrollBars")));
            this.txtProductDetail.Size = ((System.Drawing.Size)(resources.GetObject("txtProductDetail.Size")));
            this.txtProductDetail.TabIndex = ((int)(resources.GetObject("txtProductDetail.TabIndex")));
            this.txtProductDetail.Text = resources.GetString("txtProductDetail.Text");
            this.txtProductDetail.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtProductDetail.TextAlign")));
            this.txtProductDetail.Visible = ((bool)(resources.GetObject("txtProductDetail.Visible")));
            this.txtProductDetail.WordWrap = ((bool)(resources.GetObject("txtProductDetail.WordWrap")));
            this.txtProductDetail.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtProductDetail_KeyDown);
            this.txtProductDetail.Validating += new System.ComponentModel.CancelEventHandler(this.txtProductDetail_Validating);
            // 
            // lblProductDetail
            // 
            this.lblProductDetail.AccessibleDescription = resources.GetString("lblProductDetail.AccessibleDescription");
            this.lblProductDetail.AccessibleName = resources.GetString("lblProductDetail.AccessibleName");
            this.lblProductDetail.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblProductDetail.Anchor")));
            this.lblProductDetail.AutoSize = ((bool)(resources.GetObject("lblProductDetail.AutoSize")));
            this.lblProductDetail.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblProductDetail.Dock")));
            this.lblProductDetail.Enabled = ((bool)(resources.GetObject("lblProductDetail.Enabled")));
            this.lblProductDetail.Font = ((System.Drawing.Font)(resources.GetObject("lblProductDetail.Font")));
            this.lblProductDetail.ForeColor = System.Drawing.Color.Maroon;
            this.lblProductDetail.Image = ((System.Drawing.Image)(resources.GetObject("lblProductDetail.Image")));
            this.lblProductDetail.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductDetail.ImageAlign")));
            this.lblProductDetail.ImageIndex = ((int)(resources.GetObject("lblProductDetail.ImageIndex")));
            this.lblProductDetail.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblProductDetail.ImeMode")));
            this.lblProductDetail.Location = ((System.Drawing.Point)(resources.GetObject("lblProductDetail.Location")));
            this.lblProductDetail.Name = "lblProductDetail";
            this.lblProductDetail.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblProductDetail.RightToLeft")));
            this.lblProductDetail.Size = ((System.Drawing.Size)(resources.GetObject("lblProductDetail.Size")));
            this.lblProductDetail.TabIndex = ((int)(resources.GetObject("lblProductDetail.TabIndex")));
            this.lblProductDetail.Tag = "0";
            this.lblProductDetail.Text = resources.GetString("lblProductDetail.Text");
            this.lblProductDetail.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductDetail.TextAlign")));
            this.lblProductDetail.Visible = ((bool)(resources.GetObject("lblProductDetail.Visible")));
            // 
            // IssueSubMaterial
            // 
            this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
            this.AccessibleName = resources.GetString("$this.AccessibleName");
            this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
            this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
            this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
            this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
            this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
            this.CancelButton = this.btnClose;
            this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
            this.Controls.Add(this.cboCCN);
            this.Controls.Add(this.lblCCN);
            this.Controls.Add(this.dtmPostDate);
            this.Controls.Add(this.txtWOLine);
            this.Controls.Add(this.txtFromBin);
            this.Controls.Add(this.txtFromLoc);
            this.Controls.Add(this.txtProductDetail);
            this.Controls.Add(this.txtFGoodsCode);
            this.Controls.Add(this.txtProLine);
            this.Controls.Add(this.txtTranNo);
            this.Controls.Add(this.btnClose);
            this.Controls.Add(this.btnHelp);
            this.Controls.Add(this.btnSave);
            this.Controls.Add(this.btnDelete);
            this.Controls.Add(this.btnEdit);
            this.Controls.Add(this.btnAdd);
            this.Controls.Add(this.dgrdData);
            this.Controls.Add(this.btnFromBin);
            this.Controls.Add(this.lblFromBin);
            this.Controls.Add(this.btnFromLoc);
            this.Controls.Add(this.lblFromLoc);
            this.Controls.Add(this.btnWOLine);
            this.Controls.Add(this.lblProductDetail);
            this.Controls.Add(this.lblWOLine);
            this.Controls.Add(this.btnFGoodsCode);
            this.Controls.Add(this.btnProLine);
            this.Controls.Add(this.lblFGoodsCode);
            this.Controls.Add(this.lblProLine);
            this.Controls.Add(this.btnTranNo);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.lblTranNo);
            this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
            this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
            this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
            this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
            this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
            this.Name = "IssueSubMaterial";
            this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
            this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
            this.Text = resources.GetString("$this.Text");
            this.Load += new System.EventHandler(this.Pro_IssueSubMaterial_Load);
            ((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.cboCCN)).EndInit();
            this.ResumeLayout(false);

        }
        #endregion

        #region variable
        private const string THIS = "PCSProduction.WorkOrder.Pro_IssueSubMaterial";
        private EnumAction mFormMode;
        private DataSet dstData = null;
        private DataTable dtStoreGridLayout;
        private PRO_IssueSubMaterialMaster voIssueSubMaterialMaster;
        private PCSComProduction.WorkOrder.BO.Pro_IssueSubMaterialBO IssueSubMaterialBO = new Pro_IssueSubMaterialBO();

        const string PARTNUMBER = "PartNumber";
        const string V_WOCOMPLETION = "v_WOCompletion";
        const string STOCKCODE = "StockCode";
        private const string PRODUCT = "Product";

        #endregion

        #region Form Event

        private void Pro_IssueSubMaterial_Load(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".MultiWOIssueMaterial_Load()";
            try
            {
                Security objSecurity = new Security();
                this.Name = THIS;

                if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_YOU_HAVE_NO_RIGHT_TO_VIEW, MessageBoxIcon.Warning);
                    this.Close();
                    return;
                }

                //store the gridlayout
                dtStoreGridLayout = FormControlComponents.StoreGridLayout(dgrdData);

                // Load combo box
                UtilsBO boUtil = new UtilsBO();
                DataSet dstCCN = boUtil.ListCCN();
                cboCCN.DataSource = dstCCN.Tables[MST_CCNTable.TABLE_NAME];
                cboCCN.DisplayMember = MST_CCNTable.CODE_FLD;
                cboCCN.ValueMember = MST_CCNTable.CCNID_FLD;
                FormControlComponents.PutDataIntoC1ComboBox(cboCCN, dstCCN.Tables[MST_CCNTable.TABLE_NAME], MST_CCNTable.CODE_FLD, MST_CCNTable.CCNID_FLD, MST_CCNTable.TABLE_NAME);
                if (SystemProperty.CCNID != 0)
                {
                    cboCCN.SelectedValue = SystemProperty.CCNID;
                }
                //change the form mode
                mFormMode = EnumAction.Default;

                //Format dtmPostDate
                dtmPostDate.FormatType = FormatTypeEnum.CustomFormat;
                dtmPostDate.CustomFormat = Constants.DATETIME_FORMAT_HOUR;

                //clear data
                ClearForm();

                //Diable or Enable buttons
                EnableDisableButtons();
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }


        #region btn Click
        private void btnTranNo_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnTranNo_Click()";
            try
            {
                DataRowView drwResult = null;

                drwResult = FormControlComponents.OpenSearchForm(Pro_IssueSubMaterialMasterTable.TABLE_NAME, Pro_IssueSubMaterialMasterTable.TRANNO_FLD, txtTranNo.Text.Trim(), null, true);

                if (drwResult != null)
                {
                    voIssueSubMaterialMaster = new PRO_IssueSubMaterialMaster();
                    voIssueSubMaterialMaster.CCNID = int.Parse(drwResult[PRO_IssueMaterialMasterTable.CCNID_FLD].ToString());
                    voIssueSubMaterialMaster.IssueSubMaterialMasterID = int.Parse(drwResult[Pro_IssueSubMaterialMasterTable.ISSUESUBMATERIALMASTERID_FLD].ToString());
                    voIssueSubMaterialMaster.TransNo = drwResult[Pro_IssueSubMaterialMasterTable.TRANNO_FLD].ToString();
                    voIssueSubMaterialMaster.PostDate = (DateTime)drwResult[Pro_IssueSubMaterialMasterTable.POSTDATE_FLD];
                    voIssueSubMaterialMaster.LocationID = int.Parse(drwResult[Pro_IssueSubMaterialMasterTable.LOCATIONID_FLD].ToString());

                    //display the master information
                    //1.CCN ID
                    cboCCN.SelectedValue = drwResult[Pro_IssueSubMaterialMasterTable.CCNID_FLD];
                    //2.Post Date
                    dtmPostDate.Value = drwResult[Pro_IssueSubMaterialMasterTable.POSTDATE_FLD];
                    //3.Transno
                    txtTranNo.Text = drwResult[Pro_IssueSubMaterialMasterTable.TRANNO_FLD].ToString();
                    txtTranNo.Tag = voIssueSubMaterialMaster.IssueSubMaterialMasterID;

                    // Get Master information
                    DataTable dtbMasterIssue = IssueSubMaterialBO.GetMasterIssue(voIssueSubMaterialMaster.IssueSubMaterialMasterID);
                    // Location information
                    txtFromLoc.Text = dtbMasterIssue.Rows[0]["Location"].ToString();
                    txtFromLoc.Tag = voIssueSubMaterialMaster.LocationID;
                    // Bin information
                    if ((drwResult[Pro_IssueSubMaterialMasterTable.BINID_FLD] != DBNull.Value) && (drwResult[Pro_IssueSubMaterialMasterTable.BINID_FLD].ToString() != 0.ToString()))
                    {
                        voIssueSubMaterialMaster.BinID = int.Parse(drwResult[Pro_IssueSubMaterialMasterTable.BINID_FLD].ToString());
                        txtFromBin.Text = dtbMasterIssue.Rows[0]["BIN"].ToString();
                        txtFromBin.Tag = voIssueSubMaterialMaster.BinID;
                    }
                    // FGoodsCode
                    txtFGoodsCode.Tag = int.Parse(dtbMasterIssue.Rows[0][Pro_IssueSubMaterialMasterTable.SALEORDERDETAILID_FLD].ToString());
                    txtFGoodsCode.Text = dtbMasterIssue.Rows[0][SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();
                    //Product Information
                    txtProductDetail.Text = dtbMasterIssue.Rows[0][ITM_ProductTable.CODE_FLD].ToString();
                    txtWOLine.Text = dtbMasterIssue.Rows[0][ITM_ProductTable.DESCRIPTION_FLD].ToString();
                    // Get Detail information
                    dstData = IssueSubMaterialBO.GetDetailData(voIssueSubMaterialMaster.IssueSubMaterialMasterID);// LoadDetailData(voIssueSubMaterialMaster.PostDate, voIssueSubMaterialMaster.IssueSubMaterialMasterId, voIssueSubMaterialMaster.CCNID, voIssueSubMaterialMaster.MasterLocationID);
                    // Set Row
                    int introw = 1;
                    foreach (DataRow drow in dstData.Tables[0].Rows)
                    {
                        drow[PRO_WorkOrderDetailTable.LINE_FLD] = introw;
                        introw++;
                    }

                    dgrdData.DataSource = dstData.Tables[Pro_IssueSubMaterialDetailTable.TABLE_NAME];
                    FormControlComponents.RestoreGridLayout(dgrdData, dtStoreGridLayout);
                    ConfigGridLayout();

                    EnableDisableButtons();
                }
                else
                {
                    txtTranNo.Focus();
                    txtTranNo.SelectAll();
                }
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnProLine_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnProLine_Click()";
            try
            {
                DataRowView drwResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProLine.Text.Trim(), null, true);

                if (drwResult != null)
                {
                    txtProLine.Text = drwResult[PRO_ProductionLineTable.CODE_FLD].ToString();
                    txtProLine.Tag = drwResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD];
                    txtFromLoc.Tag = int.Parse(drwResult[PRO_ProductionLineTable.LOCATIONID_FLD].ToString());
                    DataRow drowBin = IssueSubMaterialBO.GetDefaultLocBin(int.Parse(drwResult[PRO_ProductionLineTable.LOCATIONID_FLD].ToString()));
                    txtFromLoc.Text = drowBin[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString();
                    try
                    {
                        txtFromBin.Text = drowBin[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString();
                        txtFromBin.Tag = Convert.ToInt32(drowBin[MST_BINTable.BINID_FLD]);
                    }
                    catch { }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        private void btnFGoodsCode_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnFGoodsCode_Click()";
            try
            {
                DataRowView drwResult = null;
                String strWhere = String.Empty;
                strWhere = SO_SaleOrderDetailTable.TABLE_NAME + "." + SO_SaleOrderDetailTable.SHIPCOMPLETED_FLD + "= 0 OR "
                    + SO_SaleOrderDetailTable.TABLE_NAME + "." + SO_SaleOrderDetailTable.SHIPCOMPLETED_FLD + " is null ";

                drwResult = FormControlComponents.OpenSearchForm(SO_SaleOrderDetailTable.TABLE_NAME, SO_SaleOrderDetailTable.FGOODSCODE_FLD, txtFGoodsCode.Text.Trim(), strWhere);
                if (drwResult != null)
                {
                    txtFGoodsCode.Tag = int.Parse(drwResult[SO_SaleOrderDetailTable.SALEORDERDETAILID_FLD].ToString());
                    txtFGoodsCode.Text = drwResult[SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();

                    #region dungla: display product information based on selected sale order detail

                    string strProductID = drwResult[SO_SaleOrderDetailTable.PRODUCTID_FLD].ToString();
                    drwResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.PRODUCTID_FLD, strProductID, null, false);
                    txtWOLine.Text = drwResult[ITM_ProductTable.DESCRIPTION_FLD].ToString();
                    txtProductDetail.Text = drwResult[ITM_ProductTable.CODE_FLD].ToString();

                    #endregion

                    dstData.Tables[0].Clear();
                }
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnFromLoc_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnFromLoc_Click()";
            try
            {
                DataRowView drwResult = null;
                drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtFromLoc.Text.Trim(), null, true);
                if (drwResult != null)
                {
                    DataRow drowBin = IssueSubMaterialBO.GetDefaultLocBin(Convert.ToInt32(drwResult[MST_LocationTable.LOCATIONID_FLD]));
                    txtFromLoc.Text = drwResult[MST_LocationTable.CODE_FLD].ToString();
                    txtFromLoc.Tag = Convert.ToInt32(drwResult[MST_LocationTable.LOCATIONID_FLD]);
                    try
                    {
                        txtFromBin.Text = drowBin[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString();
                        txtFromBin.Tag = Convert.ToInt32(drwResult[MST_BINTable.BINID_FLD]);
                    }
                    catch
                    {
                        txtFromBin.Text = string.Empty;
                        txtFromBin.Tag = 0;
                    }
                }
                else
                    txtFromLoc.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnWOLine_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSearchWOLine_Click()";
            try
            {
                if (txtProLine.Text.Length == 0)
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                    txtProLine.Focus();
                    return;
                }
                if (txtFGoodsCode.Text.Length == 0)
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                    txtFGoodsCode.Focus();
                    return;
                }
                Hashtable htbCriteria = new Hashtable();
                DataRowView drwResult = null;

                drwResult = FormControlComponents.OpenSearchForm(V_WOCOMPLETION, PRO_WorkOrderDetailTable.LINE_FLD, txtWOLine.Text.Trim(), htbCriteria, true);
                if (drwResult != null)
                {
                    if (!drwResult[PRO_WorkOrderDetailTable.WORKORDERDETAILID_FLD].Equals(lblWOLine.Tag))
                    {
                        lblWOLine.Tag = drwResult[PRO_WorkOrderDetailTable.WORKORDERDETAILID_FLD];
                    }
                    txtWOLine.Text = drwResult[PRO_WorkOrderDetailTable.LINE_FLD].ToString();
                    lblProductDetail.Tag = int.Parse(drwResult[PRO_WorkOrderDetailTable.PRODUCTID_FLD].ToString());
                    txtProductDetail.Text = drwResult[PARTNUMBER].ToString();

                    // Get Bom Info to DataSet
                    dstData = new WOBOMBO().ListBOMDetailsOfProduct((int)lblProductDetail.Tag, int.Parse(lblWOLine.Tag.ToString()), (int)EnumProductType.SubMaterial);
                    dstData.Tables[0].Columns.Add(Pro_IssueSubMaterialDetailTable.ISSUESUBMATERIALMASTERID_FLD);
                    dstData.Tables[0].Columns.Add(Pro_IssueSubMaterialDetailTable.ISSUESUBMATERIALDETAILID_FLD);
                    //dstData.Tables.Add(dtdetail);
                    dgrdData.DataSource = dstData.Tables[Pro_IssueSubMaterialDetailTable.TABLE_NAME];
                    FormControlComponents.RestoreGridLayout(dgrdData, dtStoreGridLayout);
                    ConfigGridLayout();
                }
                else
                {
                    txtProductDetail.Text = string.Empty;
                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnFromBin_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnFromBin_Click()";
            try
            {
                if (txtFromLoc.Text.Trim() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTLOC, MessageBoxIcon.Exclamation);
                    txtFromLoc.Focus();
                    return;
                }

                DataRowView drwResult = null;

                string strCondition = MST_BINTable.TABLE_NAME + "." + MST_BINTable.LOCATIONID_FLD + " = " + txtFromLoc.Tag.ToString();
                strCondition += " AND MST_BIN." + MST_BINTable.BINTYPEID_FLD + " NOT IN (" + ((int)BinTypeEnum.LS).ToString() + ", " + ((int)BinTypeEnum.IN).ToString() + ")";
                drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, txtFromBin.Text.Trim(), strCondition);

                if (drwResult != null)
                {
                    txtFromBin.Text = drwResult[MST_BINTable.CODE_FLD].ToString();
                    txtFromBin.Tag = drwResult[MST_BINTable.BINID_FLD];
                }
                else
                    txtFromBin.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnAdd_Click()";

            try
            {
                UtilsBO objUtilsBO = new UtilsBO();
                //Turn to Add action
                mFormMode = EnumAction.Add;
                //clear controls
                ClearForm();

                voIssueSubMaterialMaster = new PRO_IssueSubMaterialMaster();
                //Chaneg to default CCN
                if (SystemProperty.CCNID > 0)
                {
                    cboCCN.SelectedValue = SystemProperty.CCNID;
                }
                //setup date
                dtmPostDate.Value = objUtilsBO.GetDBDate();
                txtTranNo.Text = FormControlComponents.GetNoByMask(this);

                // Get Bom Info to DataSet
                dstData = new WOBOMBO().ListBOMDetailsOfProduct(0, 0, (int)EnumProductType.SubMaterial);
                dstData.Tables[0].Columns.Add(Pro_IssueSubMaterialDetailTable.ISSUESUBMATERIALMASTERID_FLD);
                dstData.Tables[0].Columns.Add(Pro_IssueSubMaterialDetailTable.ISSUESUBMATERIALDETAILID_FLD);
                //dstData.Tables.Add(dtdetail);
                dgrdData.DataSource = dstData.Tables[Pro_IssueSubMaterialDetailTable.TABLE_NAME];
                FormControlComponents.RestoreGridLayout(dgrdData, dtStoreGridLayout);
                ConfigGridLayout();

                //Enable Button
                EnableDisableButtons();

                //focus
                dtmPostDate.Focus();
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnEdit_Click(object sender, System.EventArgs e)
        {

        }
        private void btnDelete_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnDelete_Click()";
            try
            {
                if (txtTranNo.Text.Trim() == string.Empty)
                    return;
                if (PCSMessageBox.Show(ErrorCode.MESSAGE_DELETE_RECORD, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    IssueSubMaterialBO.DeleteIssueSubMaterial((int)txtTranNo.Tag);

                    //After deleting, clean environment
                    txtTranNo.Tag = 0; //No product after deleting

                    //Turn to default action
                    mFormMode = EnumAction.Default;

                    //clear controls
                    ClearForm();
                    EnableDisableButtons();
                    //focus
                    txtTranNo.Focus();
                }
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void btnSave_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSave_Click()";
            try
            {
                if (PCSMessageBox.Show(ErrorCode.MESSAGE_CONFIRM_BEFORE_SAVE_WOCOMPLETION, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, new string[] { dtmPostDate.Text }) == DialogResult.Yes)
                {
                    if (Security.IsDifferencePrefix(this, lblTranNo, txtTranNo) || dgrdData.EditActive)
                        return;

                    if (!ValidateMandatoryControl())
                        return;

                    if (!CheckManatoryColumnInGrid())
                        return;

                    if (SaveData())
                    {
                        //Turn to Add action
                        mFormMode = EnumAction.Default;

                        //lock form
                        LockForm(true);

                        //Enable Button
                        EnableDisableButtons();
                        Security.UpdateUserNameModifyTransaction(this, PRO_IssueMaterialMasterTable.ISSUEMATERIALMASTERID_FLD, voIssueSubMaterialMaster.IssueSubMaterialMasterID);
                        PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA, MessageBoxIcon.Information);
                    }
                }
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                //Check if IssueNo was duplicated
                if (ex.mCode == ErrorCode.DUPLICATE_KEY)
                {
                    txtTranNo.Focus();
                    txtTranNo.Select();
                }
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnHelp_Click(object sender, System.EventArgs e)
        {

        }

        private void btnClose_Click(object sender, System.EventArgs e)
        {
            this.Close();
        }

        #endregion

        #region txt Validating
        private void txtTranNo_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtTranNo_Validating()";
            try
            {
                if (txtTranNo.Modified && txtTranNo.Text.Trim() != string.Empty && btnTranNo.Enabled)
                {
                    DataRowView drwResult = null;

                    drwResult = FormControlComponents.OpenSearchForm(Pro_IssueSubMaterialMasterTable.TABLE_NAME, Pro_IssueSubMaterialMasterTable.TRANNO_FLD, txtTranNo.Text.Trim(), null, false);

                    if (drwResult != null)
                    {
                        voIssueSubMaterialMaster = new PRO_IssueSubMaterialMaster();
                        voIssueSubMaterialMaster.CCNID = int.Parse(drwResult[PRO_IssueMaterialMasterTable.CCNID_FLD].ToString());
                        voIssueSubMaterialMaster.IssueSubMaterialMasterID = int.Parse(drwResult[Pro_IssueSubMaterialMasterTable.ISSUESUBMATERIALMASTERID_FLD].ToString());
                        voIssueSubMaterialMaster.TransNo = drwResult[Pro_IssueSubMaterialMasterTable.TRANNO_FLD].ToString();
                        voIssueSubMaterialMaster.PostDate = (DateTime)drwResult[Pro_IssueSubMaterialMasterTable.POSTDATE_FLD];
                        voIssueSubMaterialMaster.LocationID = int.Parse(drwResult[Pro_IssueSubMaterialMasterTable.LOCATIONID_FLD].ToString());

                        //display the master information
                        //1.CCN ID
                        cboCCN.SelectedValue = drwResult[Pro_IssueSubMaterialMasterTable.CCNID_FLD];
                        //2.Post Date
                        dtmPostDate.Value = drwResult[Pro_IssueSubMaterialMasterTable.POSTDATE_FLD];
                        //3.Transno
                        txtTranNo.Text = drwResult[Pro_IssueSubMaterialMasterTable.TRANNO_FLD].ToString();
                        txtTranNo.Tag = voIssueSubMaterialMaster.IssueSubMaterialMasterID;

                        // Get Master information
                        DataTable dtbMasterIssue = IssueSubMaterialBO.GetMasterIssue(voIssueSubMaterialMaster.IssueSubMaterialMasterID);
                        // Location information
                        txtFromLoc.Text = dtbMasterIssue.Rows[0]["Location"].ToString();
                        txtFromLoc.Tag = voIssueSubMaterialMaster.LocationID;
                        // Bin information
                        if ((drwResult[Pro_IssueSubMaterialMasterTable.BINID_FLD] != DBNull.Value) && (drwResult[Pro_IssueSubMaterialMasterTable.BINID_FLD].ToString() != 0.ToString()))
                        {
                            voIssueSubMaterialMaster.BinID = int.Parse(drwResult[Pro_IssueSubMaterialMasterTable.BINID_FLD].ToString());
                            txtFromBin.Text = dtbMasterIssue.Rows[0]["BIN"].ToString();
                            txtFromBin.Tag = voIssueSubMaterialMaster.BinID;
                        }
                        // FGoodsCode
                        txtFGoodsCode.Tag = int.Parse(dtbMasterIssue.Rows[0][Pro_IssueSubMaterialMasterTable.SALEORDERDETAILID_FLD].ToString());
                        txtFGoodsCode.Text = dtbMasterIssue.Rows[0][SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();
                        //Product Information
                        txtProductDetail.Text = dtbMasterIssue.Rows[0][ITM_ProductTable.CODE_FLD].ToString();
                        txtWOLine.Text = dtbMasterIssue.Rows[0][ITM_ProductTable.DESCRIPTION_FLD].ToString();
                        // Get Detail information
                        dstData = IssueSubMaterialBO.GetDetailData(voIssueSubMaterialMaster.IssueSubMaterialMasterID);// LoadDetailData(voIssueSubMaterialMaster.PostDate, voIssueSubMaterialMaster.IssueSubMaterialMasterId, voIssueSubMaterialMaster.CCNID, voIssueSubMaterialMaster.MasterLocationID);
                        // Set Row
                        int introw = 1;
                        foreach (DataRow drow in dstData.Tables[0].Rows)
                        {
                            drow[PRO_WorkOrderDetailTable.LINE_FLD] = introw;
                            introw++;
                        }

                        dgrdData.DataSource = dstData.Tables[Pro_IssueSubMaterialDetailTable.TABLE_NAME];
                        FormControlComponents.RestoreGridLayout(dgrdData, dtStoreGridLayout);
                        ConfigGridLayout();

                        EnableDisableButtons();
                    }
                    else
                    {
                        txtTranNo.Focus();
                        txtTranNo.SelectAll();
                    }
                }
                else if (btnTranNo.Enabled)
                {
                    ClearForm();
                    EnableDisableButtons();
                }

            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtProLine_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnProLine_Click()";
            try
            {
                if (txtProLine.Modified && txtProLine.Text.ToString().Trim() != string.Empty && btnProLine.Enabled)
                {
                    DataRowView drwResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProLine.Text.Trim(), null, false);

                    if (drwResult != null)
                    {
                        txtProLine.Text = drwResult[PRO_ProductionLineTable.CODE_FLD].ToString();
                        txtProLine.Tag = drwResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD];
                        txtFromLoc.Tag = int.Parse(drwResult[PRO_ProductionLineTable.LOCATIONID_FLD].ToString());
                        DataRow drowBin = IssueSubMaterialBO.GetDefaultLocBin(int.Parse(drwResult[PRO_ProductionLineTable.LOCATIONID_FLD].ToString()));
                        txtFromLoc.Text = drowBin[MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString();
                        try
                        {
                            txtFromBin.Text = drowBin[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString();
                            txtFromBin.Tag = Convert.ToInt32(drowBin[MST_BINTable.BINID_FLD]);
                        }
                        catch { }
                    }
                    else
                        e.Cancel = true;
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        private void txtFGoodsCode_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtFGoodsCode_Validating()";
            try
            {
                if (txtFGoodsCode.Modified && txtFGoodsCode.Text.Length != 0)
                {
                    DataRowView drwResult = null;
                    String strWhere = String.Empty;
                    strWhere = SO_SaleOrderDetailTable.TABLE_NAME + "." + SO_SaleOrderDetailTable.SHIPCOMPLETED_FLD + "= 0 OR "
                        + SO_SaleOrderDetailTable.TABLE_NAME + "." + SO_SaleOrderDetailTable.SHIPCOMPLETED_FLD + " is null ";

                    drwResult = FormControlComponents.OpenSearchForm(SO_SaleOrderDetailTable.TABLE_NAME, SO_SaleOrderDetailTable.FGOODSCODE_FLD, txtFGoodsCode.Text.Trim(), strWhere);
                    if (drwResult != null)
                    {
                        txtFGoodsCode.Tag = int.Parse(drwResult[SO_SaleOrderDetailTable.SALEORDERDETAILID_FLD].ToString());
                        txtFGoodsCode.Text = drwResult[SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();

                        #region dungla: display product information based on selected sale order detail

                        string strProductID = drwResult[SO_SaleOrderDetailTable.PRODUCTID_FLD].ToString();
                        drwResult = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.PRODUCTID_FLD, strProductID, null, false);
                        txtWOLine.Text = drwResult[ITM_ProductTable.DESCRIPTION_FLD].ToString();
                        txtProductDetail.Text = drwResult[ITM_ProductTable.CODE_FLD].ToString();

                        #endregion

                        dstData.Tables[0].Clear();
                    }
                    else
                        e.Cancel = true;
                }
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFromLoc_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSearchLocation_Click()";
            try
            {
                if (txtFromLoc.Modified && txtFromLoc.Text.Length != 0)
                {
                    DataRowView drwResult = null;
                    drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtFromLoc.Text.Trim(), null, false);
                    if (drwResult != null)
                    {
                        DataRow drowBin = IssueSubMaterialBO.GetDefaultLocBin(Convert.ToInt32(drwResult[MST_LocationTable.LOCATIONID_FLD]));
                        txtFromLoc.Text = drwResult[MST_LocationTable.CODE_FLD].ToString();
                        txtFromLoc.Tag = Convert.ToInt32(drwResult[MST_LocationTable.LOCATIONID_FLD]);
                        try
                        {
                            txtFromBin.Text = drowBin[MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString();
                            txtFromBin.Tag = Convert.ToInt32(drwResult[MST_BINTable.BINID_FLD]);
                        }
                        catch
                        {
                            txtFromBin.Text = string.Empty;
                            txtFromBin.Tag = 0;
                        }
                    }
                    else
                        e.Cancel = true;
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtWOLine_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtWOLine_Validating()";
            try
            {
                if (txtWOLine.Text.Trim() != string.Empty && btnWOLine.Enabled)
                {
                    Hashtable htbCriteria = new Hashtable();
                    DataRowView drwResult = null;
                    //				htbCriteria.Add(ITM_ProductTable.PRODUCTTYPEID_FLD, (int)EnumProductType.SubMaterial);
                    drwResult = FormControlComponents.OpenSearchForm(V_WOCOMPLETION, PRO_WorkOrderDetailTable.LINE_FLD, txtWOLine.Text.Trim(), htbCriteria, true);
                    if (drwResult != null)
                    {
                        if (!drwResult[PRO_WorkOrderDetailTable.WORKORDERDETAILID_FLD].Equals(lblWOLine.Tag))
                        {
                            lblWOLine.Tag = drwResult[PRO_WorkOrderDetailTable.WORKORDERDETAILID_FLD];
                        }
                        txtWOLine.Text = drwResult[PRO_WorkOrderDetailTable.LINE_FLD].ToString();
                        lblProductDetail.Tag = int.Parse(drwResult[PRO_WorkOrderDetailTable.PRODUCTID_FLD].ToString());
                        txtProductDetail.Text = drwResult[PARTNUMBER].ToString();

                        // Get Bom Info to DataSet
                        dstData = new WOBOMBO().ListBOMDetailsOfProduct((int)lblProductDetail.Tag, int.Parse(lblWOLine.Tag.ToString()), (int)EnumProductType.SubMaterial);
                        //dstData.Tables.Add(dtdetail);
                        dgrdData.DataSource = dstData.Tables[Pro_IssueSubMaterialDetailTable.TABLE_NAME];
                        FormControlComponents.RestoreGridLayout(dgrdData, dtStoreGridLayout);
                        ConfigGridLayout();
                    }
                    else
                        e.Cancel = true;
                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFromBin_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtFromBin_Validating()";
            try
            {
                if (txtFromLoc.Text.Trim() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_SELECTLOC, MessageBoxIcon.Exclamation);
                    txtFromLoc.Focus();
                    return;
                }

                if (txtFromBin.Modified && txtFromBin.Text.Trim() != string.Empty)
                {
                    DataRowView drwResult = null;

                    string strCondition = MST_BINTable.TABLE_NAME + "." + MST_BINTable.LOCATIONID_FLD + " = " + txtFromLoc.Tag.ToString();
                    strCondition += " AND MST_BIN." + MST_BINTable.BINTYPEID_FLD + " != " + ((int)BinTypeEnum.LS).ToString();
                    strCondition += " AND MST_BIN." + MST_BINTable.BINTYPEID_FLD + " != " + ((int)BinTypeEnum.IN).ToString();
                    drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, txtFromBin.Text.Trim(), strCondition);

                    if (drwResult != null)
                    {
                        txtFromBin.Text = drwResult[MST_BINTable.CODE_FLD].ToString();
                        txtFromBin.Tag = drwResult[MST_BINTable.BINID_FLD];
                    }
                    else
                        e.Cancel = true;
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtProductDetail_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {

        }

        #endregion

        #region txt KeyDown
        private void txtTranNo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtTranNo_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4 && btnTranNo.Enabled)
                    btnTranNo_Click(null, null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtProLine_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtProLine_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4)
                    btnProLine_Click(null, null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFGoodsCode_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtFGoodsCode_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4)
                    btnFGoodsCode_Click(null, null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFromLoc_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtFromLoc_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4)
                    btnFromLoc_Click(null, null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFromBin_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtFromBin_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4)
                    btnFromBin_Click(null, null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtProductDetail_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {

        }

        #endregion

        #region dgrdData
        private void dgrdData_ButtonClick(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_ButtonClick()";
            try
            {
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                if (!btnSave.Enabled) return;

                if ((dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[ITM_ProductTable.CODE_FLD])))
                {
                    //open the search form to select Product
                    htbCondition = new Hashtable();
                    if (txtProLine.Text.Trim() != string.Empty)
                        htbCondition.Add(PRO_WorkOrderMasterTable.PRODUCTIONLINEID_FLD, int.Parse(txtProLine.Tag.ToString()));
                    else
                    {
                        String[] strParam = new string[2];
                        strParam[0] = lblProLine.Text;
                        strParam[1] = e.Column.DataColumn.Caption;
                        PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, strParam);
                        txtProLine.Focus();
                        return;
                    }
                    if (txtFGoodsCode.Text.Trim() != string.Empty)
                        htbCondition.Add(PRO_WorkOrderDetailTable.SALEORDERDETAILID_FLD, int.Parse(txtFGoodsCode.Tag.ToString()));
                    else
                    {
                        String[] strParam = new string[2];
                        strParam[0] = lblFGoodsCode.Text;
                        strParam[1] = e.Column.DataColumn.Caption;
                        PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, strParam);
                        txtFGoodsCode.Focus();
                        return;
                    }
                    if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
                        drwResult = FormControlComponents.OpenSearchForm(v_ItemIssueSubMaterial.TABLE_NAME, ITM_ProductTable.CODE_FLD, dgrdData[dgrdData.Row, ITM_ProductTable.CODE_FLD].ToString(), htbCondition, true);
                    else
                        drwResult = FormControlComponents.OpenSearchForm(v_ItemIssueSubMaterial.TABLE_NAME, ITM_ProductTable.CODE_FLD, dgrdData.Columns[ITM_ProductTable.CODE_FLD].Text.Trim(), htbCondition, true);
                    if (drwResult != null)
                        FillItemData(drwResult.Row);
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }


        private void dgrdData_AfterColUpdate(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";
            try
            {
                if (e.Column.DataColumn.DataField == ITM_ProductTable.CODE_FLD)
                {
                    dgrdData.EditActive = true;
                    if (e.Column.DataColumn.Tag != null)
                    {
                        DataRow drwResult = (DataRow)e.Column.DataColumn.Tag;
                        FillItemData(drwResult);
                    }
                    else
                        FillItemData(null);
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }
        private void dgrdData_BeforeColUpdate(object sender, C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_BeforeColUpdate()";
            try
            {
                Hashtable htbCondition = new Hashtable();
                string strColumnName = e.Column.DataColumn.DataField;
                DataRowView drwResult = null;
                switch (strColumnName)
                {
                    case ITM_ProductTable.CODE_FLD:
                        //open the search form to select Product
                        htbCondition = new Hashtable();
                        if (txtProLine.Text.Trim() != string.Empty)
                            htbCondition.Add(PRO_WorkOrderMasterTable.PRODUCTIONLINEID_FLD, int.Parse(txtProLine.Tag.ToString()));
                        else
                        {
                            String[] strParam = new string[2];
                            strParam[0] = lblProLine.Text;
                            strParam[1] = e.Column.DataColumn.Caption;
                            PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, strParam);
                            txtProLine.Focus();
                            return;
                        }
                        if (txtFGoodsCode.Text.Trim() != string.Empty)
                            htbCondition.Add(PRO_WorkOrderDetailTable.SALEORDERDETAILID_FLD, int.Parse(txtFGoodsCode.Tag.ToString()));
                        else
                        {
                            String[] strParam = new string[2];
                            strParam[0] = lblFGoodsCode.Text;
                            strParam[1] = e.Column.DataColumn.Caption;
                            PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, strParam);
                            txtFGoodsCode.Focus();
                            return;
                        }
                        if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
                        {
                            if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
                                drwResult = FormControlComponents.OpenSearchForm(v_ItemIssueSubMaterial.TABLE_NAME, ITM_ProductTable.CODE_FLD, dgrdData[dgrdData.Row, ITM_ProductTable.CODE_FLD].ToString(), htbCondition, true);
                            else
                                drwResult = FormControlComponents.OpenSearchForm(v_ItemIssueSubMaterial.TABLE_NAME, ITM_ProductTable.CODE_FLD, dgrdData.Columns[ITM_ProductTable.CODE_FLD].Text.Trim(), htbCondition, true);
                            if (drwResult != null)
                                e.Column.DataColumn.Tag = drwResult.Row;
                            else
                                e.Cancel = true;
                        }
                        else
                            e.Column.DataColumn.Tag = null;
                        break;
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }
        #endregion

        #endregion

        #region Private Method

        private void LockForm(bool blnLock)
        {
            dtmPostDate.Enabled = blnLock;
            cboCCN.Enabled = blnLock;
            txtTranNo.Enabled = blnLock;
            btnTranNo.Enabled = !blnLock;

            txtFGoodsCode.Enabled = !blnLock;
            btnFGoodsCode.Enabled = !blnLock;

            txtFromBin.Enabled = !blnLock;
            btnFromBin.Enabled = !blnLock;

            txtFromLoc.Enabled = !blnLock;
            btnFromLoc.Enabled = !blnLock;

            txtProLine.Enabled = blnLock;
            btnProLine.Enabled = !blnLock;

            txtProductDetail.Enabled = !blnLock;

            dgrdData.AllowUpdate = !blnLock;
            dgrdData.AllowDelete = !blnLock;

        }
        private void EnableDisableButtons()
        {
            switch (mFormMode)
            {
                case EnumAction.Add:

                    //Disable Buttons
                    btnAdd.Enabled = false;
                    btnSave.Enabled = true;
                    btnEdit.Enabled = false;
                    btnDelete.Enabled = false;

                    dtmPostDate.Enabled = true;
                    txtTranNo.ReadOnly = false;
                    btnTranNo.Enabled = false;
                    txtProLine.Enabled = true;
                    btnProLine.Enabled = true;
                    txtFromLoc.Enabled = true;
                    btnFromLoc.Enabled = true;
                    txtFromBin.Enabled = true;
                    btnFromBin.Enabled = true;
                    txtFGoodsCode.Enabled = true;
                    btnFGoodsCode.Enabled = true;
                    txtWOLine.Enabled = true;
                    btnWOLine.Enabled = true;
                    txtProductDetail.Enabled = true;
                    dgrdData.Splits[0].Locked = false;
                    dgrdData.AllowDelete = true;
                    break;
                case EnumAction.Edit:
                    //Disable Buttons
                    btnAdd.Enabled = false;
                    btnSave.Enabled = true;
                    btnEdit.Enabled = false;
                    btnDelete.Enabled = false;

                    dtmPostDate.Enabled = true;
                    txtTranNo.ReadOnly = false;
                    btnTranNo.Enabled = false;
                    txtProLine.Enabled = true;
                    btnProLine.Enabled = true;
                    txtFromLoc.Enabled = true;
                    btnFromLoc.Enabled = true;
                    txtFromBin.Enabled = true;
                    btnFromBin.Enabled = true;
                    txtFGoodsCode.Enabled = true;
                    btnFGoodsCode.Enabled = true;
                    txtWOLine.Enabled = true;
                    btnWOLine.Enabled = true;
                    txtProductDetail.Enabled = true;
                    dgrdData.Splits[0].Locked = false;
                    dgrdData.AllowDelete = false;
                    break;
                case EnumAction.Default:
                    //Disable Buttons
                    btnAdd.Enabled = true;
                    btnSave.Enabled = false;
                    if (txtTranNo.Text.Trim() != string.Empty)
                    {
                        btnEdit.Enabled = true;
                        btnDelete.Enabled = true;
                    }
                    else
                    {
                        btnEdit.Enabled = true;
                        btnDelete.Enabled = true;
                    }
                    dgrdData.Splits[0].Locked = true;
                    dtmPostDate.Enabled = false;
                    txtTranNo.ReadOnly = false;
                    btnTranNo.Enabled = true;
                    txtProLine.Enabled = false;
                    btnProLine.Enabled = false;
                    txtFromLoc.Enabled = false;
                    btnFromLoc.Enabled = false;
                    txtFromBin.Enabled = false;
                    btnFromBin.Enabled = false;
                    txtFGoodsCode.Enabled = false;
                    btnFGoodsCode.Enabled = false;
                    txtWOLine.Enabled = false;
                    btnWOLine.Enabled = false;
                    txtProductDetail.Enabled = false;
                    dgrdData.AllowDelete = false;
                    break;
            }
        }

        private void ClearForm()
        {
            //general information
            dtmPostDate.Value = DBNull.Value;
            txtTranNo.Text = string.Empty;
            txtTranNo.Tag = string.Empty;

            txtProLine.Text = string.Empty;
            txtProLine.Tag = string.Empty;
            txtFromLoc.Text = string.Empty;
            txtFromLoc.Tag = string.Empty;
            txtFromBin.Text = string.Empty;
            txtFromBin.Tag = string.Empty;
            txtFGoodsCode.Text = string.Empty;
            txtFGoodsCode.Tag = string.Empty;
            txtWOLine.Text = string.Empty;
            txtProductDetail.Text = string.Empty;
            //clear data in the grid
            if (dstData != null && dstData.Tables.Count > 0)
                dstData.Tables[0].Rows.Clear();
        }
        private void ConfigGridLayout()
        {
            if (mFormMode == EnumAction.Default)
            {
                dgrdData.Splits[0].DisplayColumns[PRO_WOBOMTable.LINE_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.DESCRIPTION_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.REVISION_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[STOCKCODE].Locked = true;
                dgrdData.Splits[0].DisplayColumns[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].Locked = true;

                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD].Button = false;

                //set width for column
                dgrdData.Splits[0].DisplayColumns[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].Style.HorizontalAlignment = AlignHorzEnum.Far;
                dgrdData.Columns[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
            }
            else
            {
                dgrdData.Splits[0].DisplayColumns[PRO_WOBOMTable.LINE_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD].Locked = false;
                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.DESCRIPTION_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.REVISION_FLD].Locked = true;
                dgrdData.Splits[0].DisplayColumns[STOCKCODE].Locked = true;
                dgrdData.Splits[0].DisplayColumns[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].Locked = false;

                dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD].Button = true;

                //set width for column
                dgrdData.Splits[0].DisplayColumns[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].Style.HorizontalAlignment = AlignHorzEnum.Far;
                dgrdData.Columns[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
                dgrdData.AllowAddNew = true;
                dgrdData.AllowUpdate = true;

            }

            for (int i = 0; i < dgrdData.Splits[0].DisplayColumns.Count; i++)
                dgrdData.Splits[0].DisplayColumns[i].HeadingStyle.HorizontalAlignment = AlignHorzEnum.Center;
        }
        private bool ValidateMandatoryControl()
        {
            if (cboCCN.SelectedIndex < 0)
            {
                //MessageBox.Show("Please select the CCN ");
                PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                cboCCN.Focus();
                return false;
            }

            if (dtmPostDate.Value == DBNull.Value || dtmPostDate.Text.Trim() == string.Empty)
            {
                //MessageBox.Show("Please input the Post date");
                PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_POSTDATE, MessageBoxIcon.Warning);
                dtmPostDate.Focus();
                return false;
            }

            //			//check the PostDate in the current period
            //			if (!FormControlComponents.CheckDateInCurrentPeriod((DateTime) dtmPostDate.Value))
            //			{
            //				//MessageBox.Show("The Post Date you input is not in the current period");
            //				PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_POSTDATE_PERIOD, MessageBoxIcon.Warning);
            //				dtmPostDate.Focus();
            //				return false;
            //			}

            //Post date must be in the past
            UtilsBO boUtils = new UtilsBO();
            if (((DateTime)dtmPostDate.Value) > boUtils.GetDBDate())
            {
                PCSMessageBox.Show(ErrorCode.MESSAGE_INV_TRANSACTION_CANNOT_IN_FUTURE, MessageBoxIcon.Exclamation);
                dtmPostDate.Focus();
                return false;
            }

            if (txtTranNo.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MSG_LABORTIME_TRANSNO, MessageBoxIcon.Warning);
                txtTranNo.Focus();
                return false;
            }

            if (txtProLine.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                txtProLine.Focus();
                return false;
            }

            if (txtFromLoc.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                txtFromLoc.Focus();
                return false;
            }

            if (txtFromBin.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                txtFromBin.Focus();
                return false;
            }

            if (txtFGoodsCode.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                txtFGoodsCode.Focus();
                return false;
            }

            if (txtWOLine.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
                txtWOLine.Focus();
                return false;
            }

            //Check postdate in configuration
            if (!FormControlComponents.CheckPostDateInConfiguration((DateTime)dtmPostDate.Value))
            {
                return false;
            }
            return true;
        }

        private bool SaveData()
        {
            AssignValueToMaster();

            // synchronyze data
            FormControlComponents.SynchronyGridData(dgrdData);
            List<PRO_IssueSubMaterialDetail> listDetail = new List<PRO_IssueSubMaterialDetail>();
            foreach (DataRow drow in dstData.Tables[0].Rows)
            {
                if (drow.RowState != DataRowState.Deleted)
                {
                    PRO_IssueSubMaterialDetail obj = new PRO_IssueSubMaterialDetail();
                    if (drow[Pro_IssueSubMaterialDetailTable.PRODUCTID_FLD] != null && drow[Pro_IssueSubMaterialDetailTable.PRODUCTID_FLD].ToString() != string.Empty)
                        obj.ProductID = Convert.ToInt32(drow[Pro_IssueSubMaterialDetailTable.PRODUCTID_FLD]);
                    if (drow[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD] != null && drow[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].ToString() != string.Empty)
                        obj.Qty = Convert.ToDecimal(drow[Pro_IssueSubMaterialDetailTable.QUANTITY_FLD]);
                    if (drow[Pro_IssueSubMaterialDetailTable.UMID_FLD] != null && drow[Pro_IssueSubMaterialDetailTable.UMID_FLD].ToString() != string.Empty)
                        obj.UMID = Convert.ToInt32(drow[Pro_IssueSubMaterialDetailTable.UMID_FLD]);
                    listDetail.Add(obj);
                }
            }
            switch (mFormMode)
            {
                case EnumAction.Add:
                    if (IssueSubMaterialBO.InsertIssueSubMaster(voIssueSubMaterialMaster, listDetail))
                    {
                        lblTranNo.Tag = voIssueSubMaterialMaster.IssueSubMaterialMasterID;
                    }
                    else return false;
                    break;

                case EnumAction.Edit:
                    break;
            }
            return true;
        }

        private void AssignValueToMaster()
        {
            voIssueSubMaterialMaster.CCNID = int.Parse(cboCCN.SelectedValue.ToString());
            voIssueSubMaterialMaster.PostDate = (DateTime)dtmPostDate.Value;
            voIssueSubMaterialMaster.TransNo = txtTranNo.Text.ToString().Trim();
            try
            {
                voIssueSubMaterialMaster.LocationID = int.Parse(txtFromLoc.Tag.ToString());
            }
            catch
            {
                voIssueSubMaterialMaster.LocationID = 0;
            }
            try
            {
                voIssueSubMaterialMaster.BinID = int.Parse(txtFromBin.Tag.ToString());
            }
            catch
            {
                voIssueSubMaterialMaster.BinID = 0;
            }
            voIssueSubMaterialMaster.ProductionLineID = int.Parse(txtProLine.Tag.ToString());
            voIssueSubMaterialMaster.SaleOrderDetailID = int.Parse(txtFGoodsCode.Tag.ToString());
        }

        private bool CheckManatoryColumnInGrid()
        {
            if ((dstData.Tables.Count <= 0) || (dgrdData.RowCount <= 0)) return false;

            int intTotalRow = dgrdData.RowCount;
            ArrayList arrExistProduct = new ArrayList();
            for (int intRow = 0; intRow < intTotalRow; intRow++)
            {
                // set selected row first
                dgrdData.Row = intRow;

                decimal decCommitQuantity = 0;

                if (dgrdData[intRow, PRO_IssueMaterialDetailTable.PRODUCTID_FLD] == DBNull.Value
                    || dgrdData[intRow, PRO_IssueMaterialDetailTable.PRODUCTID_FLD].ToString().Trim() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MSG_WOISSUE_MATERIAL_SELECT_COMPONENT, MessageBoxIcon.Warning);
                    dgrdData.Col = dstData.Tables[0].Columns.IndexOf(ITM_ProductTable.CODE_FLD);
                    dgrdData.Focus();
                    dgrdData.Select();
                    return false;
                }

                string strProductID = dgrdData[intRow, Pro_IssueSubMaterialDetailTable.PRODUCTID_FLD].ToString();
                if (arrExistProduct.Contains(strProductID))
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_DUPLICATE_ITEM, MessageBoxIcon.Error);
                    dgrdData.Row = intRow;
                    dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD]);
                    dgrdData.Focus();
                    return false;
                }
                else
                    arrExistProduct.Add(strProductID);
                try
                {
                    decCommitQuantity = decimal.Parse(dgrdData[intRow, Pro_IssueSubMaterialDetailTable.QUANTITY_FLD].ToString());
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_INVALID_NUMERIC, MessageBoxIcon.Warning);
                    dgrdData.Col = dstData.Tables[0].Columns.IndexOf(Pro_IssueSubMaterialDetailTable.QUANTITY_FLD);
                    dgrdData.Focus();
                    dgrdData.Select();
                    return false;
                }

                if (decCommitQuantity <= 0)
                {
                    PCSMessageBox.Show(ErrorCode.MSG_WOISSUE_MATERIAL_COMMIT_QTY_GREATER_THAN_ZERO, MessageBoxIcon.Warning);
                    dgrdData.Col = dstData.Tables[0].Columns.IndexOf(PRO_IssueMaterialDetailTable.COMMITQUANTITY_FLD);
                    dgrdData.Focus();
                    dgrdData.Select();
                    return false;
                }
            }
            return true;
        }

        private void FillItemData(DataRow pdrowData)
        {
            int i = dgrdData.Row;
            const string CATEGORY_FLD = "Category";
            if (pdrowData != null)
            {
                int intRountCount = dgrdData.RowCount;
                for (int row = 0; row < intRountCount - 1; row++)
                {
                    if (dgrdData[row, ITM_ProductTable.CODE_FLD].ToString() == pdrowData[ITM_ProductTable.PRODUCTID_FLD].ToString())
                    {
                        PCSMessageBox.Show(ErrorCode.DUPLICATE_KEY, MessageBoxIcon.Error);
                        dgrdData.Row = row;
                        dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD]);
                        dgrdData.Focus();
                        return;
                    }
                }
                dgrdData.EditActive = true;
                dgrdData[i, PRO_WorkOrderDetailTable.LINE_FLD] = i + 1;
                dgrdData[i, ITM_ProductTable.CODE_FLD] = pdrowData[ITM_ProductTable.CODE_FLD].ToString();
                dgrdData[i, ITM_ProductTable.DESCRIPTION_FLD] = pdrowData[ITM_ProductTable.DESCRIPTION_FLD].ToString();
                dgrdData[i, ITM_ProductTable.REVISION_FLD] = pdrowData[ITM_ProductTable.REVISION_FLD].ToString();

                dgrdData[i, Pro_IssueSubMaterialDetailTable.PRODUCTID_FLD] = pdrowData[ITM_ProductTable.PRODUCTID_FLD].ToString();
                dgrdData[i, Pro_IssueSubMaterialDetailTable.UMID_FLD] = pdrowData[ITM_ProductTable.STOCKUMID_FLD].ToString();
                dgrdData[i, STOCKCODE] = IssueSubMaterialBO.GetUMCodeByID(int.Parse(pdrowData[ITM_ProductTable.STOCKUMID_FLD].ToString()));

                dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD]);
                dgrdData.Focus();
            }
            else
            {
                dgrdData.EditActive = true;
                dgrdData[i, PRO_WorkOrderDetailTable.LINE_FLD] = i + 1;
                dgrdData[i, ITM_ProductTable.CODE_FLD] = string.Empty;
                dgrdData[i, ITM_ProductTable.DESCRIPTION_FLD] = string.Empty;
                dgrdData[i, ITM_ProductTable.REVISION_FLD] = string.Empty;

                dgrdData[i, Pro_IssueSubMaterialDetailTable.PRODUCTID_FLD] = null;
                dgrdData[i, Pro_IssueSubMaterialDetailTable.UMID_FLD] = null;
                dgrdData[i, Pro_IssueSubMaterialDetailTable.QUANTITY_FLD] = null;
                dgrdData[i, STOCKCODE] = string.Empty;

                dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[ITM_ProductTable.CODE_FLD]);
                dgrdData.Focus();
            }
        }
        #endregion

        private void dgrdData_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_KeyDown()";
            try
            {
                switch (e.KeyCode)
                {
                    case Keys.F4:
                        if (btnSave.Enabled)
                        {
                            dgrdData_ButtonClick(sender, null);
                        }
                        break;
                    case Keys.Delete:
                        FormControlComponents.DeleteMultiRowsOnTrueDBGrid(dgrdData);
                        for (int i = 0; i < dgrdData.RowCount - 1; i++)
                            dgrdData[i, PRO_WOBOMTable.LINE_FLD] = i + 1;
                        break;
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
    }
}
